I created a website on my localhost with three .mdf files using SQL express but now I get an error when I try to host it on my web server without SQL express. need some help on how to change my connec

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)

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: 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)

Source Error:

here is my web.config file:

<?xml version="1.0"?><!--

Note: As an alternative to hand editing this file you can use the

web admin tool to configure settings for your application. Use

the Website->Asp.Net Configuration option in Visual Studio.

A full list of settings and comments can be found in

machine.config.comments usually located in

\Windows\Microsoft.Net\Framework\v2.x\Config

-->

<
configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<appSettings>

<add key="EmailFrom" value="webmaster@reaganpower.com"/>

<add key="EmailSubject" value="File Ready for Download!"/>

<add key="SmtpServer" value=""/>

<add key="MailUser" value=""/>

<add key="MailPassword" value=""/>

<add key="MailPort" value="25"/>

<add key="EmailFormatSelected" value="Text"/>

<add key="PageTitle" value="Send It Now!"/>

<add key="ShareLocalFolderPath" value="H:\MIS Department\Intranet\SendItNow\FileStorage\"/>

<add key="httpDownloadPath" value="http://misfs/SendItNow/ContentFiles/"/>

<!--

<add key="CurrentTheme" value="CleanBlue" />

-->

<add key="CurrentTheme" value="CleanOrange"/>

</appSettings>

<connectionStrings>

<add name="ConnectionString" connectionString="Data Source=(local)\SqlExpress;AttachDbFilename=|DataDirectory|\FileShareDB.mdf;Integrated Security=True;User Instance=True"

providerName="System.Data.SqlClient"/>

</connectionStrings>

<system.web><!--

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

Visual Basic options:

Set strict="true" to disallow all data type conversions

where data loss can occur.

Set explicit="true" to force declaration of all variables.

-->

 

<
identity impersonate="false"/>

<roleManager enabled="true"/>

<compilation debug="true" strict="false" explicit="true">

<assemblies>

<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>

<pages>

<namespaces>

<clear/>

<add namespace="System"/>

<add namespace="System.Collections"/>

<add namespace="System.Collections.Specialized"/>

<add namespace="System.Configuration"/>

<add namespace="System.Text"/>

<add namespace="System.Text.RegularExpressions"/>

<add namespace="System.Web"/>

<add namespace="System.Web.Caching"/>

<add namespace="System.Web.SessionState"/>

<add namespace="System.Web.Security"/>

<add namespace="System.Web.Profile"/>

<add namespace="System.Web.UI"/>

<add namespace="System.Web.UI.WebControls"/>

<add namespace="System.Web.UI.WebControls.WebParts"/>

<add namespace="System.Web.UI.HtmlControls"/>

</namespaces>

</pages>

<!--

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

-->

<authentication mode="Forms"/>

<!--

The <customErrors> section enables configuration

of what to do if/when an unhandled error occurs

during the execution of a request. Specifically,

it enables developers to configure html error pages

to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

<error statusCode="403" redirect="NoAccess.htm" />

<error statusCode="404" redirect="FileNotFound.htm" />

</customErrors>

-->

</system.web>

</configuration>

0
cluce
2/15/2008 10:14:05 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

2 Replies
4797 Views

Similar Articles

[PageSpeed] 11

Check out this page:

http://www.datamasker.com/SSE2005_NetworkCfg.htm


David Wier
MCP/ASPInsider
ASPNet101.com - where to look first!
Control Grouper - easily control properties for multiple controls with one control!
Calendar Express - The Best HTML Calendar Generator on the web!
(Please 'Mark as Answer' when it applies)
0
augustwind
2/15/2008 10:27:14 PM

You need to check with whoever manages the server for connection details to an available SQL Server.  Also, the Full version does not support AttachDbFileName, so they will have to manually attach the db to the server instance.

 


Regards Mike
[MVP - ASP/ASP.NET]
My site
0
Mikesdotnetting
2/15/2008 10:28:35 PM
Reply:

Web resources about - I created a website on my localhost with three .mdf files using SQL express but now I get an error when I try to host it on my web server without SQL express. need some help on how to change my connec - asp.net.sql-datasource

localhost - Wikipedia, the free encyclopedia
In computer networking , localhost (meaning this computer ) is the standard hostname given to the address of the loopback network interface. ...

Google Mobile Apps links cannot connect in Safari always showing "localhost" in address - Google Product ...
... it goes to Safari and tries to connect with the error "Safari cannot open the page because it could not connect to the server". http://localhost/ ...

[INFO] 2015-08-31 02:47:37.186 IN id=pushpin-m2-7999_1, GET http://localhost/sys - Pastebin.com
PASTEBIN - #1 paste tool since 2002 create new paste shop new! tools api archive faq PASTEBIN create new paste trending pastes sign up login ...

Universal Studios finds pirated Jurassic World on own localhost
There's no place like 127.0.0.1 Universal Pictures France appears to have tracked down one source of pirated copies of dino-flick Jurassic World: ...

Universal Pictures Wants To Remove Localhost and IMDB Pages From Google Results
Artem Tashkinov writes: We've all known for a very long time that DCMA takedown requests are often dubious and even more often outright wrong ...

Microsoft Research Paper Considers Serving Web-ads From Localhost
An anonymous reader writes: A paper from Microsoft researchers posits the possibility of 'pushing' web ads to a user's own computer and serving ...

Windows 10 build 10166: Edge browser gets bug fixes and localhost loopback enabled
Earlier today, Microsoft rolled out yet another Windows 10 build for those of you on the Fast Ring. Build 10166 comes with a "wave" of bug fixes ...

Universal Pictures asks Google to delist itself in localhost 127.0.0.1 online piracy bungle
Universal Pictures tried to protect Jurassic World from being pirated but instead showed its ignorance.

Platform Updates: Operation Developer Love
... Contact Us Link Specific event name fails Facebook Invite hangs for an user with about 4000 friends Developer App will not allow "localhost" ...

HOME
Contour Aerospace Ltd

Resources last updated: 12/22/2015 12:03:27 PM