VS 2010 - sqlexpress - connection string in wcf service
-
Hello, (know this isn't directly related to vb but didn't know which forum to ask so any help would be appreciated) I am getting an error from IIS AppPool when attempting to call a WCF service which accesses a table in sqlexpress that's local to my PC. Using server explorer, I can access the table just fine and took the connection string right from server explorer and plugged it into the connection string area of the web.config. What do I need to do with IIS to allow it? ConnString-> Data Source=xxxxxxxx\SQLEXPRESS;Initial Catalog=GBUtilities;Integrated Security=True" The Error is (also used default app pool - doesn't matter):
System.Data.SqlClient.SqlException was unhandled by user code Class=11 ErrorCode=-2146232060 LineNumber=65536 Message=Cannot open database "GBUtilities" requested by the login. The login failed. Login failed for user 'IIS APPPOOL\Classic .NET AppPool'. Number=4060 Procedure="" Server=xxxxxxxx\SQLEXPRESS Source=.Net SqlClient Data Provider State=1 StackTrace: at UtilMgr.GetMenuItems() in C:\inetpub\wwwroot\GB.Utilities.WS\App_Code\UtilMgr.vb:line 18 at SyncInvokeGetMenuItems(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) InnerException:
thank you Nathan'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
-
Hello, (know this isn't directly related to vb but didn't know which forum to ask so any help would be appreciated) I am getting an error from IIS AppPool when attempting to call a WCF service which accesses a table in sqlexpress that's local to my PC. Using server explorer, I can access the table just fine and took the connection string right from server explorer and plugged it into the connection string area of the web.config. What do I need to do with IIS to allow it? ConnString-> Data Source=xxxxxxxx\SQLEXPRESS;Initial Catalog=GBUtilities;Integrated Security=True" The Error is (also used default app pool - doesn't matter):
System.Data.SqlClient.SqlException was unhandled by user code Class=11 ErrorCode=-2146232060 LineNumber=65536 Message=Cannot open database "GBUtilities" requested by the login. The login failed. Login failed for user 'IIS APPPOOL\Classic .NET AppPool'. Number=4060 Procedure="" Server=xxxxxxxx\SQLEXPRESS Source=.Net SqlClient Data Provider State=1 StackTrace: at UtilMgr.GetMenuItems() in C:\inetpub\wwwroot\GB.Utilities.WS\App_Code\UtilMgr.vb:line 18 at SyncInvokeGetMenuItems(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) InnerException:
thank you Nathan'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
In the connection string, try replacing
Integrated Security=True
withUid=[user];Pwd=[password]
My advice is free, and you may get what you paid for.