Ben Conner
asked on
moving ASP.net site to new 2016 server breaks connection string to SQL Server
Hi,
I maintain an ASP.net site for a friend on a hosting company's server. They recently either upgraded the server to Windows 2016 or moved it to a 2016 server. Now it throws the error when going to a page that access the SQL Server database:
Server Error in '/site1' Application.
The ConnectionString property has not been initialized.
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.InvalidOperationExc eption: The ConnectionString property has not been initialized.
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.
Stack Trace:
[InvalidOperationException : The ConnectionString property has not been initialized.]
System.Data.SqlClient.SqlC onnection. Permission Demand() +7022674
System.Data.SqlClient.SqlC onnectionF actory.Per missionDem and(DbConn ection outerConnection) +30
System.Data.ProviderBase.D bConnectio nInternal. TryOpenCon nectionInt ernal(DbCo nnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +318
System.Data.SqlClient.SqlC onnection. TryOpenInn er(TaskCom pletionSou rce`1 retry) +132
System.Data.SqlClient.SqlC onnection. TryOpen(Ta skCompleti onSource`1 retry) +246
System.Data.SqlClient.SqlC onnection. Open() +122
Timb.usedEquipment.BuildCa tegoryMenu DT() in G:\Files\860664\Timb\usedE quipment.a spx.cs:68
Timb.usedEquipment.Page_Lo ad(Object sender, EventArgs e) in G:\Files\860664\Timb\usedE quipment.a spx.cs:42
System.Web.UI.Control.OnLo ad(EventAr gs e) +109
System.Web.UI.Control.Load Recursive( ) +68
System.Web.UI.Page.Process RequestMai n(Boolean includeStagesBeforeAsyncPo int, Boolean includeStagesAfterAsyncPoi nt) +1436
I know very little about .net sites; all I've done to date is make minor static content changes. The last change of any type was in early January, and to the site logic, several years.
The hosting company is saying it is an issue within the site. While that may be true, it was working before the move and doesn't now.
Should I punt this back to them or try to figure out what the actual root cause is? I wouldn't even know where to start. I don't code in .net.
Thanks!
--Ben
I maintain an ASP.net site for a friend on a hosting company's server. They recently either upgraded the server to Windows 2016 or moved it to a 2016 server. Now it throws the error when going to a page that access the SQL Server database:
Server Error in '/site1' Application.
The ConnectionString property has not been initialized.
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.InvalidOperationExc
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.
Stack Trace:
[InvalidOperationException
System.Data.SqlClient.SqlC
System.Data.SqlClient.SqlC
System.Data.ProviderBase.D
System.Data.SqlClient.SqlC
System.Data.SqlClient.SqlC
System.Data.SqlClient.SqlC
Timb.usedEquipment.BuildCa
Timb.usedEquipment.Page_Lo
System.Web.UI.Control.OnLo
System.Web.UI.Control.Load
System.Web.UI.Page.Process
I know very little about .net sites; all I've done to date is make minor static content changes. The last change of any type was in early January, and to the site logic, several years.
The hosting company is saying it is an issue within the site. While that may be true, it was working before the move and doesn't now.
Should I punt this back to them or try to figure out what the actual root cause is? I wouldn't even know where to start. I don't code in .net.
Thanks!
--Ben
Please post web.config (without server name, username and password)
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hired an EE expert to resolve a time sensitive issue.