Problem deploying forms authorization




I have a forms authentication application in asp.net 2.0 which is working fine on my development machine. I authenticate the user with a simple custom routine. I have copied the database to the production server and have given necessary permissions for the logged on user to access the database. Using SQL profiler I can see that the queries are being carried out on the sql server (2005).

My production server is giving me an error page "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) "

this error is in spite of the fact that my queries called in the code have ran properly on sql server.

If I remove the forms authorization mode portion of the web config file, the rest of my application works fine on the production server, and I have no problem accessing the database. Here is my web config:

<system.web>

<authorization>
<allow roles="admin"/>
<allow roles="manager"/>
<allow roles="user"/>
<deny users="?" />

</authorization>

<identity impersonate="true" userName="myuser" password="password"/>

<roleManager enabled="true" />
<compilation debug="true" strict="false" explicit="true"/>

<authentication mode="Forms">
<forms loginUrl="Logon.aspx" name=".ASPXFORMSAUTH">
</forms>


</authentication>

It appears my deployment problem has something to do with configuration of the logon page. As the code works on my production machine, and the connection is made with sql server, I don't think its a problem with the code, but with some configuation settings.

Any help is appreciated.

haim katz
.