views:

225

answers:

3

update:

Forgot to mention that the app only breaks and shows that error when I try to login as asp.net membership user (sql membership provider), before that everything is fine and the app communicates with the sql just fine.

Hello,

I'm writing an asp.net app that's using asp.net sqlmembership and connecting to a SQL Server 2008 database remotely via VPN,

connection string:

add name="MonoSqlServer" connectionString="Data Source=MONO;Initial Catalog=SMSPortal;Integrated Security=SSPI;"

this works perfectly if I use the inbuilt http server that comes with visual studio...but if I deploy this to my local IIS (same machine as the inbuilt server) I get an exception:

Exception Details: System.Data.SqlClient.SqlException: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

What am I doing wrong?

BR

A: 

Grant NetworkServices (or whatever account you are using for IIS) access to your membership database

TFD
A: 

Your ASPNET user doesn't have permission to access the VPN. When you're running in debug under Cassini server, you're accessing the VPN via your own user. You need to either provide the local ASPNET user with permission to the SQL server and VPN or configure your application to use a user account that has access to both.

Joel Etherton
The application pool is running under the account that I'm using to log in and that works fine apparently with the local file webserver...judging from the logs, the error is on the SQL server side but it doesn't say which account is he trying to log with
Acanthus
@acanthus: But what user is being used to run IIS itself? The w3wp.exe process will also need to be executed with a valid login.
Joel Etherton
from the process listing it's my own account, the same that's set in the app pool
Acanthus
A: 

Apparently your SQL server is in an AD domain that doesn't have trusts established with the domain that your web server and it's aspnet user is in.

Try using sql server auth, i.e. username and password. I think you will have success.

Sky Sanders
yeah that was the case, using sql auth now, thanks :)
Acanthus