Setup SQL connection on IIS7
Setup SQL connection on IIS7
am 14.11.2007 16:10:30 von thunder
Hi All,
I am new to IIS and am trying to write a simple ASP.NET application.
My ADO.net code works fine in the development environment (outside IIS); but
I can't get it two work within IIS7. This is all on my local machine not a
production web server.
I tried removing the default connection, which is the localSQL connection
and create a new one attaching to my SQL Server on the network, but it fails
when launching the web page indicating that it can no longer find the
localSQl connection. It's odd to me because I never, in any place, wrote
code using any local connection.
Anyway, if someone would be so kind and steer me in the correct direction
for setting up a proper connection to my sql server on IIS7 I would
appreciate it.
Thanks.
Re: Setup SQL connection on IIS7
am 14.11.2007 23:16:23 von Trevor Benedict R
Would you mind posting the ASP.NET code.
Regards,
Trevor MCSD
"Thunder" wrote in message
news:06AC94E6-52AC-4173-9BC5-7094CCE4A667@microsoft.com...
> Hi All,
> I am new to IIS and am trying to write a simple ASP.NET application.
> My ADO.net code works fine in the development environment (outside IIS);
> but I can't get it two work within IIS7. This is all on my local machine
> not a production web server.
> I tried removing the default connection, which is the localSQL connection
> and create a new one attaching to my SQL Server on the network, but it
> fails when launching the web page indicating that it can no longer find
> the localSQl connection. It's odd to me because I never, in any place,
> wrote code using any local connection.
>
> Anyway, if someone would be so kind and steer me in the correct direction
> for setting up a proper connection to my sql server on IIS7 I would
> appreciate it.
>
> Thanks.
Re: Setup SQL connection on IIS7
am 15.11.2007 13:08:52 von Rick Barber
Are you using ASP.Net 2.0 and membership and roles? If so, you will note
that there is a LocalSQLServer connection string and references to it in
Machine.config which may be what you are running into.
--
Rick Barber
http://www.orcsweb.com
Managed Complex Hosting
#1 in Service and Support
"Thunder" wrote in message
news:06AC94E6-52AC-4173-9BC5-7094CCE4A667@microsoft.com...
> Hi All,
> I am new to IIS and am trying to write a simple ASP.NET application.
> My ADO.net code works fine in the development environment (outside IIS);
> but I can't get it two work within IIS7. This is all on my local machine
> not a production web server.
> I tried removing the default connection, which is the localSQL connection
> and create a new one attaching to my SQL Server on the network, but it
> fails when launching the web page indicating that it can no longer find
> the localSQl connection. It's odd to me because I never, in any place,
> wrote code using any local connection.
>
> Anyway, if someone would be so kind and steer me in the correct direction
> for setting up a proper connection to my sql server on IIS7 I would
> appreciate it.
>
> Thanks.