Last post Nov 03, 2008 04:33 PM by bizfeel
Nov 02, 2008 07:54 AM|bizfeel|LINK
Installed a new computer (xp, sql expresss 2005, iis 6)
I have several asp.net 2.0 web sites now that all run well on the previous computer both from VS and on IIS (from the outside web). however the new pc installation cannot run any of the asp.net websites from IIS, but only locally from VS.
it seems that the problem occures when trying to connect to sql server.
the error message decribes customer errors should be off (but in the code it is off) :
<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration>
<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration>
Nov 02, 2008 10:08 AM|Agapito|LINK
Check again the customErrors tag in web.config and get sure it's off.
Web.Config is case sensitive!!
off != Off
Without the error.... there's not much I can help...
Nov 02, 2008 02:51 PM|bizfeel|LINK
here's the code line i got: <customErrors mode="Off">
I rather suspect its something related to SQL management permssions
Nov 02, 2008 03:03 PM|Agapito|LINK
I believe if you forguet to add the '/' it will give error.. so you must have it right...
Well... without the error... there's not much I can help... Try see if there's something in the event viewer...
Nov 02, 2008 03:20 PM|bizfeel|LINK
1. what do you mean "forgot the '/" it will give error..."
2. still about SQL express 2005- any things i should define there after first install?
Nov 02, 2008 03:49 PM|Agapito|LINK
You write <customErrors mode="Off"> when it should be <customErrors mode="Off" />
How are you connecting to the database?
username/password or windows authentication?
Nov 02, 2008 05:24 PM|bizfeel|LINK
- The tag was closed separtley (was a part of a bigger statement: <customErrors mode="Off">
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm"/>
- About connecting to SQL- I connect using SQL Authentication.
Nov 02, 2008 05:32 PM|Agapito|LINK
Do you activated the mixed authentication mode when you installed SQL server?
By default, the authentication mode active is windows authentication...
On sql server management studio, server properties, security, se the server authentication.
And don't forget to define a password for your sa user.
Nov 02, 2008 05:44 PM|bizfeel|LINK
well all works fine and connects to SQL Server as long as I'm working locally (so I guess its not about connection method). The problem appears only when trying to access the website using my machine IP as URL...
any other ideas?
Nov 02, 2008 05:47 PM|Agapito|LINK
Can you access the IIS home page remotely?
Nov 02, 2008 05:53 PM|bizfeel|LINK
yes I have no problem accessing any pages that are not connecting to SQL Server.
Nov 02, 2008 06:14 PM|Agapito|LINK
sorry, but without a proper error message... I don't know how to help you...
Nov 02, 2008 06:17 PM|bizfeel|LINK
I see. any other thing I can try to get a proper error message ?
Any other ideas?
Nov 02, 2008 06:18 PM|bizfeel|LINK
been trying to reinstall aspnet membership for default DB, but got this error message (maybe its related to the original issue here):
Unable to connect to SQL Server database.
Details of failure
System.Web.HttpException: Unable to connect to SQL Server database. ---> System.Data.SqlClient.SqlException: 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)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean
Nov 03, 2008 02:47 PM|devcalpoly|LINK
Few things top of my head.
1. SQL Server instance is configured using mixed authentication (not only Windows authentication)
2. Make sure the port # that sql server instance is running on (by default 1433), if something else is specified please update connection string according to it.
3. Make sure Firewall App isn't blocking any connection to IIS and Sql Server
4. Make sure username and password using in the connection string are correct
Nov 03, 2008 03:02 PM|bizfeel|LINK
Could you please detail more about SQL Express port? (where do i configure it on sql management, Do I need to open TCP / UDP / Both on Firewall... )
Nov 03, 2008 03:57 PM|devcalpoly|LINK
You can configure SQL instace port under "SQL Server Configuration Manager". You can open both TCP/UDP port in your firewall app for SQL Server.
Nov 03, 2008 04:33 PM|bizfeel|LINK
I opened the port on xp firewall and on the router, yet the problem persists...