Go Back   Access World Forums > Apps and Windows > VB.NET

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 10-26-2012, 09:46 AM   #16
jcruzAME
Newly Registered User
 
Join Date: Oct 2011
Posts: 135
Thanks: 1
Thanked 0 Times in 0 Posts
jcruzAME is on a distinguished road
Re: Question About Some Code

How do I go about setting up a manual ODBC connection?

Also, I remote into the SQL and Web servers from my laptop. I will check the authentication. I'm not sure on that. I know when I open the SQL Server Management Studio it defaults to Windows Authentication.

EDIT: It is set up for mixed authentication.

Also, on the servers when I remote in, the user names are WFINC\(username here). Like on my laptop, the SQL Server name is something like RH9XWMW\DEV2012(SQL Server 11.0.2100 - RH9XWMW\jcruz) and on the SQL server it's WFSQL01(SQL Server 11.0.2100 - WFINC\(username here)).

jcruzAME is offline   Reply With Quote
Old 10-26-2012, 09:57 AM   #17
jcruzAME
Newly Registered User
 
Join Date: Oct 2011
Posts: 135
Thanks: 1
Thanked 0 Times in 0 Posts
jcruzAME is on a distinguished road
Re: Question About Some Code

Just created a manual ODBC connection and connected to the server no problem. Tested Data Source and it took like a split second to confirm.
jcruzAME is offline   Reply With Quote
Old 10-26-2012, 10:26 AM   #18
AccessMSSQL
Seasoned Programmer-ette
 
Join Date: May 2012
Location: Los Angeles, California
Posts: 636
Thanks: 1
Thanked 111 Times in 109 Posts
AccessMSSQL will become famous soon enough AccessMSSQL will become famous soon enough
Re: Question About Some Code

Not sure what the issue is then. You created the ODBC from the exact same machine you are trying to run the code on right? What credentials did you put in? Test ODBC with the same credentials that are in your web.config. Another question for you? Are you running the code locally in debug mode to test it? Or, is it already published to a sever. You should also check to make sure the internet guest account has rights to the SQL Server database. You need to actually add the internet guest account to SQL Server as a login and then give that login rights to your database.

__________________
Cheryl

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

***********************
please mark threads complete if issue is resolved!
AccessMSSQL is offline   Reply With Quote
Old 10-26-2012, 10:29 AM   #19
jcruzAME
Newly Registered User
 
Join Date: Oct 2011
Posts: 135
Thanks: 1
Thanked 0 Times in 0 Posts
jcruzAME is on a distinguished road
Re: Question About Some Code

Quote:
Originally Posted by AccessMSSQL View Post
Not sure what the issue is then. You created the ODBC from the exact same machine you are trying to run the code on right? What credentials did you put in? Test ODBC with the same credentials that are in your web.config. Another question for you? Are you running the code locally in debug mode to test it? Or, is it already published to a sever. You should also check to make sure the internet guest account has rights to the SQL Server database. You need to actually add the internet guest account to SQL Server as a login and then give that login rights to your database.
When testing the ODBC, I did use the credentials I'm using for the site.

We have IIS installed on the server and it's being run from that. I click browse to test it.

That last part about the internet guest, can you expand on that? I've never heard that before. What would that entail for checking that?

Thanks for all your help so far.
jcruzAME is offline   Reply With Quote
Old 10-26-2012, 10:56 AM   #20
AccessMSSQL
Seasoned Programmer-ette
 
Join Date: May 2012
Location: Los Angeles, California
Posts: 636
Thanks: 1
Thanked 111 Times in 109 Posts
AccessMSSQL will become famous soon enough AccessMSSQL will become famous soon enough
Re: Question About Some Code

Are you guys running IIS 7 or IIS 6.0
__________________
Cheryl

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

***********************
please mark threads complete if issue is resolved!
AccessMSSQL is offline   Reply With Quote
Old 10-26-2012, 11:00 AM   #21
jcruzAME
Newly Registered User
 
Join Date: Oct 2011
Posts: 135
Thanks: 1
Thanked 0 Times in 0 Posts
jcruzAME is on a distinguished road
Re: Question About Some Code

Looks like we're running V7.
jcruzAME is offline   Reply With Quote
Old 10-26-2012, 11:19 AM   #22
AccessMSSQL
Seasoned Programmer-ette
 
Join Date: May 2012
Location: Los Angeles, California
Posts: 636
Thanks: 1
Thanked 111 Times in 109 Posts
AccessMSSQL will become famous soon enough AccessMSSQL will become famous soon enough
Re: Question About Some Code

Here's a couple of articles that might help. IIS 6.0 is more straight forward because you can locate the IUSER account easily from a networked SQL server. But in IIS7 it appears to be not as intuitive.

http://stackoverflow.com/questions/4...t-mvc-security

http://stackoverflow.com/questions/1...-server-logons

http://www.iis.net/learn/manage/conf...ool-identities

http://stackoverflow.com/questions/8...etwork-service

I couldn't find any clearly written articles on this but I think this might be the direction you need to go. IIS 6.0 was simpler.

__________________
Cheryl

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

***********************
please mark threads complete if issue is resolved!
AccessMSSQL is offline   Reply With Quote
Old 10-26-2012, 11:39 AM   #23
jcruzAME
Newly Registered User
 
Join Date: Oct 2011
Posts: 135
Thanks: 1
Thanked 0 Times in 0 Posts
jcruzAME is on a distinguished road
Re: Question About Some Code

Quote:
This does not work when your SQL Server is on a different machine than IIS – rboarman Aug 21 at 20:15

Correct. If it isn't, and if you are not in an active directory, then you have to create a user account on the server hosting your SQL. If you use SQL authentication, then you can create a simple SQL account. If not, you can use a windows account with the same username and password as the user account that the website is running under, but the website has to be running as a user with "Login as a Service" permissions
Do you know what they mean by that last part? Login as a Service permissions?
jcruzAME is offline   Reply With Quote
Old 10-26-2012, 11:49 AM   #24
jcruzAME
Newly Registered User
 
Join Date: Oct 2011
Posts: 135
Thanks: 1
Thanked 0 Times in 0 Posts
jcruzAME is on a distinguished road
Re: Question About Some Code

I just looked up some stuff on that part, but no one ever mentions which user this needs to be set as. The user on the Web Server or the one on the SQL Server? Do you know?

EDIT: I just checked and it is set for the user on the web server. I'm at a complete loss here as to why the site can't open a connection to the SQL Server. Every piece of troubleshooting I come across I find out it's already been done.
jcruzAME is offline   Reply With Quote
Old 10-26-2012, 11:54 AM   #25
AccessMSSQL
Seasoned Programmer-ette
 
Join Date: May 2012
Location: Los Angeles, California
Posts: 636
Thanks: 1
Thanked 111 Times in 109 Posts
AccessMSSQL will become famous soon enough AccessMSSQL will become famous soon enough
Re: Question About Some Code

You have to set this up on the web server. Here's a quick article:

http://stackoverflow.com/questions/1...domain-account
__________________
Cheryl

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

***********************
please mark threads complete if issue is resolved!
AccessMSSQL is offline   Reply With Quote
Old 10-26-2012, 11:55 AM   #26
jcruzAME
Newly Registered User
 
Join Date: Oct 2011
Posts: 135
Thanks: 1
Thanked 0 Times in 0 Posts
jcruzAME is on a distinguished road
Re: Question About Some Code

I just found that thread as well. I checked and the web server user has that enabled.
jcruzAME is offline   Reply With Quote
Old 10-26-2012, 12:02 PM   #27
AccessMSSQL
Seasoned Programmer-ette
 
Join Date: May 2012
Location: Los Angeles, California
Posts: 636
Thanks: 1
Thanked 111 Times in 109 Posts
AccessMSSQL will become famous soon enough AccessMSSQL will become famous soon enough
Re: Question About Some Code

hmmmm...are you guys using AD?

did you try creating odbc from the webserver yet?
__________________
Cheryl

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

***********************
please mark threads complete if issue is resolved!
AccessMSSQL is offline   Reply With Quote
Old 10-26-2012, 12:03 PM   #28
jcruzAME
Newly Registered User
 
Join Date: Oct 2011
Posts: 135
Thanks: 1
Thanked 0 Times in 0 Posts
jcruzAME is on a distinguished road
Re: Question About Some Code

What is AD?

Yes, I responded a few posts ago that I had created an ODBC connection without a problem.
jcruzAME is offline   Reply With Quote
Old 10-26-2012, 12:08 PM   #29
AccessMSSQL
Seasoned Programmer-ette
 
Join Date: May 2012
Location: Los Angeles, California
Posts: 636
Thanks: 1
Thanked 111 Times in 109 Posts
AccessMSSQL will become famous soon enough AccessMSSQL will become famous soon enough
Re: Question About Some Code

Oh..Active Directory. Sorry.
__________________
Cheryl

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

***********************
please mark threads complete if issue is resolved!
AccessMSSQL is offline   Reply With Quote
Old 10-26-2012, 12:10 PM   #30
jcruzAME
Newly Registered User
 
Join Date: Oct 2011
Posts: 135
Thanks: 1
Thanked 0 Times in 0 Posts
jcruzAME is on a distinguished road
Re: Question About Some Code

We are indeed using AD.

jcruzAME is offline   Reply With Quote
Reply

Tags
asp.net , connection failed , error 40 , sql server , vb.net

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Code within code.. Newbie Question ezykiwi Modules & VBA 4 10-05-2006 07:06 AM
Code Question ppoole16 Forms 1 08-22-2003 07:56 AM
Code Question JustMaybe General 3 12-10-2002 04:49 AM
Code question Peter Paul Modules & VBA 1 04-25-2001 12:12 AM
Code Question Peter Paul Modules & VBA 1 05-23-2000 02:28 AM




All times are GMT -8. The time now is 06:26 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World