Connection String Help


Author
Message
Howard Bennett
Howard Bennett
StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)
Group: Forum Members
Posts: 57, Visits: 496
Not only am I new to StrataFrame AND Web Dev AND VS - but also to SQL Blush...needing a little help on the connection string.  I've copied the connection string from one of the wizards - but getting this error upon adding it to my global.asax - "Unrecognized escape sequence."

Here's what's in the Global.asax:

DataLayer.DataSources.Add(new SqlDataSourceItem("", "Data Source=SQLLR01\SQLLR01;Initial Catalog=PTPlusData;Integrated Security=True"));

Thanks again for helping the new guy out!

HB


Replies
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Howard,



The issue is that in order for integrated security to work, you would need to give the IIS user (IUSR_ComputerName) access to the database server. Which would mean that EVERYONE IN THE UNIVERSE would have access to the database server.



OK, that is a bit overstated. But in general it is a bad idea to allow that user access to anything other than web pages. I do believe there is another option to setup the web site such that the user has to log into a domain when accessing the web site, in which case, each of those users would then need database access (and as I recall, this can get complicated fast too). This then kills connection pooling as Bill was indicating. It also means that you have to manage all those users on the database as well as in the domain and in the application. In general, it is waaaaaaaaaaaaay easier and safer to just have a database user that your application will use.



Hope that makes sense.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Wow...what Trent said! I really, really need to look and see if Trent is checking out a post before I post....
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
LOL...not to worry...all good stuff BigGrin
Howard Bennett
Howard Bennett
StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)
Group: Forum Members
Posts: 57, Visits: 496
Yep - that makes sense.  Just so you'll know, our web server is not on our domain and our SQL Server is (which means it's not on the same machine as the web serverWink)

I do understand about the security issues and  - again - thank you for being helpful in educating me on all this.

I'm still testing and haven't published to the web server yet - so hadn't run into the problems you brought up.  I have changed the connection string to specify a user and (after changing the SQL Server to the "mixed" mode of authentication) can connect just fine.

Thanks for all your help...until next time!

HB

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Howard Bennett - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Howard Bennett - 17 Years Ago
Trent L. Taylor - 17 Years Ago
                     If you have a named instance that you are referencing in the...
Bill Cunnien - 17 Years Ago
                         Just FWI...SF automatically adds the Asynchronous processing tag for...
Trent L. Taylor - 17 Years Ago
                             [quote]Just FWI...[/quote] New acronym? :P I'll knock those off,...
Bill Cunnien - 17 Years Ago
                                 Oops...that is what fast typing get you...speed kills :D
Trent L. Taylor - 17 Years Ago
                         Bill and Trent, Thanks - I've changed it to look like this:...
Howard Bennett - 17 Years Ago
                             Hey HB! It has been a while since I worked on a web application, but...
Bill Cunnien - 17 Years Ago
                                 [quote] DataLayer .DataSources.Add( new SqlDataSourceItem (...
Trent L. Taylor - 17 Years Ago
                                 Howard,

The issue is that in order for integrated security...
Greg McGuffey - 17 Years Ago
                                     :Wow:...what Trent said! I really, really need to look and see if...
Greg McGuffey - 17 Years Ago
                                         LOL...not to worry...all good stuff :D
Trent L. Taylor - 17 Years Ago
                                             Yep - that makes sense. Just so you'll know, our web server is not on...
Howard Bennett - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search