deploying asp.net website on IIS giving problems why?

1.4k views Asked by At

i developed an asp.net site using forms based authentication, that site is working when i run from visual studio builtin server, but when i deploy it in a IIS server its showing following error when i tried to login

Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Data.SqlClient.SqlException: Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

I am using asp.net default template but i configured user authorization through web.config file, like

<authentication mode="Forms">
  <forms loginUrl="~/Login.aspx" 
         name=".ASPXAUTH"
         path="/"
         requireSSL="false"
         slidingExpiration="true"
         defaultUrl="~/Admin/OrderHistory.aspx"
         cookieless="UseDeviceProfile"
         enableCrossAppRedirects="false"
         >
    <credentials passwordFormat="Clear">
      <user name="Admin" password="adm123$"/>
      <user name="Administrator" password="adm234%"/>
    </credentials>
  </forms>
</authentication>

Imp info

i am able to logon using the VS builtin server but unable to login using IIS

EDIT

Hi after changing the process model identity to NetworkService the earlier error was gone but i am not able to login

Every time its showing wrong credentials error message

im using asp.net membership login control to get the username and password

its working in VS builtin server

1

There are 1 answers

7
Ravi Vanapalli On BEST ANSWER

Try connecting to your live database from your local pc, this will clear if it is to do with the username/ password used by you or some IIS configuration has to be done.

You can also check this link http://blogs.iis.net/bills/archive/2009/10/07/error-connecting-to-sql-server-from-windows-7-windows-2008-r2-with-asp-net.aspx