fosiul01
asked on
Sql server Connection error
HI, I upload all my files in web server ( hosting companies server). when am trying to run my page its giving me this error :
Server Error in '/' Application.
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)
You can check the problem in here : www.fosiul.co.uk/order.aspx
this file run in localhost fine. but not in web server(hosting compaines server)
Please i need help to fix this problem ( how i will eidit web.config file )
Server Error in '/' Application.
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)
You can check the problem in here : www.fosiul.co.uk/order.aspx
this file run in localhost fine. but not in web server(hosting compaines server)
Please i need help to fix this problem ( how i will eidit web.config file )
Is the sql browisng service started on the machine
ASKER
sorry i didnot understand by sql browsing server in mechine ??
this problme is in , web server ( hosted company's )
check this one : www.fosiul.co.uk/order.aspx
in localhost(in my pc) , its runs fine.
this problme is in , web server ( hosted company's )
check this one : www.fosiul.co.uk/order.aspx
in localhost(in my pc) , its runs fine.
The machine the sql service is running on you need to goto the surface area configuration , select the database engine highlight remote connections and alter to allow remote connections.
if there shoudl be no connection to the sql server then you have left some code in the files specifying a data link
if there shoudl be no connection to the sql server then you have left some code in the files specifying a data link
ASKER
I am checking give me 10 minutes
ASKER
HI
what i got is a Pleask control panel from Web hosting company. , but i am not seeing any options in there to set allow remote connectons
what shall i do ??
here is my webconfig i wrote for web connection :
<?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\Fra mework\v2. x\Config
-->
<configuration>
<appSettings />
<connectionStrings>
<add name="HalloweenConnection" connectionString="Data Source=.\SQLEXPRESS;Integr ated Security=SSPI;AttachDBFile name=|Data Directory| fosiul.mdf ;User Instance=true" />
</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.
-->
<compilation debug="true" />
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<!--
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="GenericEr rorPage.ht m">
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm "/>
</customErrors>
-->
<customErrors mode="Off" />
</system.web>
</configuration>
what i got is a Pleask control panel from Web hosting company. , but i am not seeing any options in there to set allow remote connectons
what shall i do ??
here is my webconfig i wrote for web connection :
<?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\Fra
-->
<configuration>
<appSettings />
<connectionStrings>
<add name="HalloweenConnection"
</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.
-->
<compilation debug="true" />
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<!--
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="GenericEr
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm
</customErrors>
-->
<customErrors mode="Off" />
</system.web>
</configuration>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
well, i understand ,what you mean,
but my problem is, I am not controling this sql server 2005 , web hosting company is controling.
I have attached 2 pictures, if you can help me.
1.maincontrol panel
2.asp.net settings
3.sql server webmin (where i can create table)
pleask.GIF
asp.net.GIF
webmin.GIF
but my problem is, I am not controling this sql server 2005 , web hosting company is controling.
I have attached 2 pictures, if you can help me.
1.maincontrol panel
2.asp.net settings
3.sql server webmin (where i can create table)
pleask.GIF
asp.net.GIF
webmin.GIF
Apologies but the error message definately relates to the sql remote connections option with the surace configruation you say you can access it locally therefore where you are accessing it locally please change the surface configuration to allow remote connections
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yes you are right dusion, its connection string. its dones, its ok now, but i just want to put some data to see how it goes.
Lol so my earlier comment
where does this instance sit
add name="HalloweenConnection" connectionString="Data Source=.\SQLEXPRESS;Integr ated Security=SSPI;AttachDBFile name=|Data Directory| fosiul.mdf ;User Instance=true
didnt help
where does this instance sit
add name="HalloweenConnection"
didnt help
ASKER
Thanks for telling me this!! i am stupid i should of think before .
but i realy thought, you are giving me soluton on the basic of the database is in my pc, thats why i was confused, for this reason i upload all those picture to tell you, Database is not in my pc, its in webhosting companies server.
anyway, its worked, i now know how to connect database.
problem is i am just learning and copying code from books.
Thanks anyway
but i realy thought, you are giving me soluton on the basic of the database is in my pc, thats why i was confused, for this reason i upload all those picture to tell you, Database is not in my pc, its in webhosting companies server.
anyway, its worked, i now know how to connect database.
problem is i am just learning and copying code from books.
Thanks anyway
ASKER
Thanks to both