views:

39

answers:

3

I'm VPNed into the office which has a SQL Server. I'm running IIS 7 on my local machine (at home) to serve an asp.net 2.0 web application. If I put localhost as the my db server, aspx pages load fine (but no db connectivity since I'm not running SQL Server). If I point to the remote server, my app never loads. Even pages that don't require db connectivity!

This project works fine when I'm at the office.

Any ideas?

Thanks

A: 

If it's a connectivity problem with the db, you'd eventually get a timeout exception. Does the app test the db connection in a master page, or global.asax? That might explain the wait on non-db-connected pages.

Brian Schantz
You wouldn't necessarily get a timeout. You can set the connections to wait forever. But good thought; it's not likely he's done this.
Joel Coehoorn
A: 
  • Option 1

You're using a trusted connection for management studio, which means you're connecting via the user account you used to authenticate the vpn.

Your asp.net pages do not run via your user account. They run as Network Service or something similar, and so the trusted connection fails.

  • Option 2

The VPN is causing an IP conflict somewhere between the local and remote network, and so your http request to view the page doesn't know where to go.

Joel Coehoorn
No, my VPN connection doesn't come with any ActiveDirectory stuff. I log into the db using regular credentials (with both my app and Mgmt Studio).If VPN is causing IP conflict, why does Management Studio connect without a hitch?
Mr Grieves
Because it's not the database connection that's causing your problem. It's the http request for the page from your browser.
Joel Coehoorn
A: 

Might be something specific between openVPN and SQL Server.

See here.

Mr Grieves
No, I don't think this is the same issue.
Mr Grieves