PHISSUG

Home of Filipino Sql Server Enthusiasts
Welcome to PHISSUG Sign in | Join | Help
in Search

Deploying a Web Application that uses ASP.NET Membership

Last post 12-13-2007, 10:26 AM by twistur. 4 replies.
Sort Posts: Previous Next
  •  12-12-2007, 10:07 PM 2236

    Deploying a Web Application that uses ASP.NET Membership

    Hello,

    I am currently making a web application on ASP.NET that uses two SQL Server 2005 MDFs. One is the ASP.NET membership and the other is a custom database that I use for my other stuff. On my development machine, the application works fine but when I published my application in a local folder and assigned a virtual folder for that (running on IIS 5.1), I can't start the application properly.

    My questions are:

    1) Would there be a tweak needed for the web.config file to run the application. If yes, what changes do I need to place?
    2) Say if I'll deploy it to my hosting provider running on ASP.NET 2.0 with SQL Server 2005 Express, do I need to attach my 2 MDF files to the instance running on the server OR what are the questions that I should ask my hosting provider to enable my application run on their servers?

    Thanks.
     

  •  12-12-2007, 11:01 PM 2237 in reply to 2236

    Re: Deploying a Web Application that uses ASP.NET Membership

    What is the error msg?

    >>Would there be a tweak needed for the web.config file to run the application. If yes, what changes do I need to place?

    you need to change the connectionstring.

  •  12-13-2007, 12:34 AM 2239 in reply to 2237

    Re: Deploying a Web Application that uses ASP.NET Membership

    Error Message: Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

  •  12-13-2007, 1:42 AM 2240 in reply to 2239

    Re: Deploying a Web Application that uses ASP.NET Membership

    please try to add User Instance=False in your connectionstring.Lets us know what will happen

    Data Source=.\SQLEXPRESS;
    User ID=xxxxxx;Password=xxxxx;
    AttachDbFilename=C:\InetPub\VirtualFolderName\ASPNETDB.mdf­
    Database=ASPNETDB
    ;
    Integrated Security=False;User Instance=False"

    Please note:

    1. AttachDbFileName should have a complete path of your mdf file

    2. Why is the Database parameter needed? If the named database have already been attached, SQL Server does not reattach it. It uses the attached database as the default for the connection.

    ref: http://www.connectionstrings.com/?carrier=sqlserver2005

     

  •  12-13-2007, 10:26 AM 2246 in reply to 2236

    Re: Deploying a Web Application that uses ASP.NET Membership

    carlsons:

    1) Would there be a tweak needed for the web.config file to run the application. If yes, what changes do I need to place?
    2) Say if I'll deploy it to my hosting provider running on ASP.NET 2.0 with SQL Server 2005 Express, do I need to attach my 2 MDF files to the instance running on the server OR what are the questions that I should ask my hosting provider to enable my application run on their servers?

    Thanks. 

     

    It seems like you develop your app using Web Developer Express that's why you're in User Instance or Run As Normal User (RANU). Check for the path of your MDFs in the prod machine. They might be in the wrong folder.

    RANU is not the norm in commercial web hosting arena. In order to run using real instance, the 2 dbs must be attached and the connection strings will be chagned into something like 

         "Data Source=.\SQLExpress;Initial Catalog=AspNetDb;Integrated security=true"         for your security database

         "Data Source=.\SQLExpress;Initial Catalog=BusinessDb;Integrated security=true"     for your business database

    The constring assumes there is an instance named SQLExpress and the windows account logged in has access to the database. (see Arthur's list for an exhaustive reference of constrings). Don't worry, your provider will do all the work for you.

View as RSS news feed in XML
Powered by Community Server (Personal Edition), by Telligent Systems