I am having difficulty connecting to SQL 2005 Express from ASP Pages.
My Web site is a mix of data driven ASP.NET 2.0 pages and some complicated
ASP pages which I have not had time to migrate. I recently copied all the my
data from SQL 2000 Server to SQL Express. My ASP.NET pages connect correctly
but when I change the connecting string in my ASP pages the pages break
without returning an error.
My working connecting string in web.config:
Data Source=.\SQLEXPRESS;Initial Catalog=DatabaseName;Integrated
Security=True
My working connecting string on my ASP pages:
Provider=SQLOLEDB.1;Data Source=Server2000Name;Initial
Catalog=DatabaseName;User ID=spdbuser;Password=password
Connecting strings I have tried on my ASP pages:
Provider=SQLNCLI.1;Data Source=.\SQLEXPRESS;Initial
Catalog=DatabaseName;Integrated Security=SSPI;Persist Security Info=False
Provider=SQLOLEDB.1;Data Source=.\SQLEXPRESS;Initial
Catalog=DatabaseName;Integrated Security=SSPI;Persist Security Info=False
Data Source=.\SQLEXPRESS;Initial Catalog=DatabaseName;Integrated
Security=True
I have also tried Data Source=Server2005Name\SQLEXPRESS in the three
connecting string above.
I have verified that a connection is being made from IIS in SQL Express,
using the IUSER account but the page does not serve. I have included IUSER
in the MSSQLUser group and assigned login permissions for the MSSQLUser
group to the database.
Any ideas?
Regards,
Fred Chateau
fchateauAtComcastDotNet
Hi Fred,
Check out these connection strings (they are same for express version):
http://www.connectionstrings.com/
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
"Fred Chateau" <fchateau@.127.0.0.1> wrote in message
news:Oi%23IL0B7GHA.4304@.TK2MSFTNGP03.phx.gbl...
>I am having difficulty connecting to SQL 2005 Express from ASP Pages.
> My Web site is a mix of data driven ASP.NET 2.0 pages and some complicated
> ASP pages which I have not had time to migrate. I recently copied all the
> my data from SQL 2000 Server to SQL Express. My ASP.NET pages connect
> correctly but when I change the connecting string in my ASP pages the
> pages break without returning an error.
> My working connecting string in web.config:
> Data Source=.\SQLEXPRESS;Initial Catalog=DatabaseName;Integrated
> Security=True
> My working connecting string on my ASP pages:
> Provider=SQLOLEDB.1;Data Source=Server2000Name;Initial
> Catalog=DatabaseName;User ID=spdbuser;Password=password
> Connecting strings I have tried on my ASP pages:
> Provider=SQLNCLI.1;Data Source=.\SQLEXPRESS;Initial
> Catalog=DatabaseName;Integrated Security=SSPI;Persist Security Info=False
> Provider=SQLOLEDB.1;Data Source=.\SQLEXPRESS;Initial
> Catalog=DatabaseName;Integrated Security=SSPI;Persist Security Info=False
> Data Source=.\SQLEXPRESS;Initial Catalog=DatabaseName;Integrated
> Security=True
> I have also tried Data Source=Server2005Name\SQLEXPRESS in the three
> connecting string above.
> I have verified that a connection is being made from IIS in SQL Express,
> using the IUSER account but the page does not serve. I have included IUSER
> in the MSSQLUser group and assigned login permissions for the MSSQLUser
> group to the database.
> Any ideas?
> Regards,
> Fred Chateau
> fchateauAtComcastDotNet
>
>
|||"Miha Markic [MVP C#]" <miha at rthand com> wrote...
> Hi Fred,
> Check out these connection strings (they are same for express version):
> http://www.connectionstrings.com/
It worked...
I just wanted to mention I got my original connection strings using UDL
(Windows Universal Data Link extension). I've always relied on UDL in the
past but in this scenario UDL definitely doesn't work.
Regards,
Fred Chateau
|||Probably has nothing to do with your connection strings.
1. Make sure you have an acceptable protocol to connect. Open the Config
Manager and add TCP/IP or named pipes (Express is in memory only).
2. If Express is on a different machine than the web server, turn on SQL
Browser
3. Make sure Express is set up for mixed mode. By default, it is not. I do
not have an URL, but google and you should find the command line to switch
to mixed from windows auth.
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
*************************************************
Think outside of the box!
*************************************************
"Fred Chateau" <fchateau@.127.0.0.1> wrote in message
news:Oi%23IL0B7GHA.4304@.TK2MSFTNGP03.phx.gbl...
>I am having difficulty connecting to SQL 2005 Express from ASP Pages.
> My Web site is a mix of data driven ASP.NET 2.0 pages and some complicated
> ASP pages which I have not had time to migrate. I recently copied all the
> my data from SQL 2000 Server to SQL Express. My ASP.NET pages connect
> correctly but when I change the connecting string in my ASP pages the
> pages break without returning an error.
> My working connecting string in web.config:
> Data Source=.\SQLEXPRESS;Initial Catalog=DatabaseName;Integrated
> Security=True
> My working connecting string on my ASP pages:
> Provider=SQLOLEDB.1;Data Source=Server2000Name;Initial
> Catalog=DatabaseName;User ID=spdbuser;Password=password
> Connecting strings I have tried on my ASP pages:
> Provider=SQLNCLI.1;Data Source=.\SQLEXPRESS;Initial
> Catalog=DatabaseName;Integrated Security=SSPI;Persist Security Info=False
> Provider=SQLOLEDB.1;Data Source=.\SQLEXPRESS;Initial
> Catalog=DatabaseName;Integrated Security=SSPI;Persist Security Info=False
> Data Source=.\SQLEXPRESS;Initial Catalog=DatabaseName;Integrated
> Security=True
> I have also tried Data Source=Server2005Name\SQLEXPRESS in the three
> connecting string above.
> I have verified that a connection is being made from IIS in SQL Express,
> using the IUSER account but the page does not serve. I have included IUSER
> in the MSSQLUser group and assigned login permissions for the MSSQLUser
> group to the database.
> Any ideas?
> Regards,
> Fred Chateau
> fchateauAtComcastDotNet
>
>
|||Yep, UDL is not a good option anymore.
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
"Fred Chateau" <fchateau@.127.0.0.1> wrote in message
news:%23JOYeTF7GHA.3644@.TK2MSFTNGP03.phx.gbl...
> "Miha Markic [MVP C#]" <miha at rthand com> wrote...
>
> It worked...
> I just wanted to mention I got my original connection strings using UDL
> (Windows Universal Data Link extension). I've always relied on UDL in the
> past but in this scenario UDL definitely doesn't work.
> Regards,
> Fred Chateau
>
|||"Cowboy (Gregory A. Beamer)" wrote ...
> Probably has nothing to do with your connection strings.
It _was_ the connection string, Cowboy.
ASP.NET 2.0 --> Data Source=.\SQLEXPRESS;Integrated Security=True
ASP --> Provider=SQLNCLI.1;Data Source=.\SQLEXPRESS;Integrated
Security=SSPI
"Integrated Security=True" does not work in ASP.
Regards,
Fred Chateau
fchateauAtComcastDotNet
Friday, February 17, 2012
Connectiing to SQL 2005 from ASP Pages
Labels:
asp,
complicatedasp,
connectiing,
connecting,
database,
difficulty,
driven,
express,
microsoft,
mix,
mysql,
net,
oracle,
pages,
server,
sql,
web
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment