Showing posts with label weird. Show all posts
Showing posts with label weird. Show all posts

Wednesday, March 28, 2012

Web Service & SQL Server Authentication

Hi there

I have this weird problem. I created a Web Service that extracts data from the SQL Server and then return it as a XML document.

The problem is when the Web Service gets to the code to open the Connection to the server it gives this error.

System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Now my Win32 application works just fine, using the same code. Thus I believe the problem might be the settings of IIS.

But unfortunately I don't even know where to start looking.

Some help would really be appreciated.

Thanx in advanceIf you are trying to open a connection via sql server authentication (note: not windows), you need to grant access to that account in your db. If you are using windows authentication, you need to grant access to the asp.net account.
Sorry misread

Saturday, March 24, 2012

Web Service not updating when developing and debugging within VS 2005

Guys,
I've been experiencing a weird problem. I am developing a web service in
pretty much the same way I do develop other types of application using
C#.net (2.0). The problem is that when I run the application from Visual
Studio the code that is presented to me is different than the actual code.
It takes some cumbersome actions to get it to work:
a) "clean" the solution, rebuild it and then run
b) close and open VS again
c) "Stop" the Web Servers that VS opens when you are debugging a web service
within the IDE
This is not pratical at all. Have any of you experienced the same problem?
Is there a solution for this?
I think that I may be doing something wrong. It is prety cumbersome to
develop a web service, doing deployments, attaching to process and so on to
properly debug an application.
Any thoughts?
Regards,
Robson Siqueira
Enterprise ArchitectIs your webservice in the same project? If not have you tried right
clicking on the web reference you added and selecting update, this will
refresh the wsdl used to generate your proxy class for the webservice.
MattC
"Robson Siqueira" <robson@.robsonfelix.com> wrote in message
news:us6aZ40kHHA.680@.TK2MSFTNGP06.phx.gbl...
> Guys,
> I've been experiencing a weird problem. I am developing a web service in
> pretty much the same way I do develop other types of application using
> C#.net (2.0). The problem is that when I run the application from Visual
> Studio the code that is presented to me is different than the actual code.
> It takes some cumbersome actions to get it to work:
> a) "clean" the solution, rebuild it and then run
> b) close and open VS again
> c) "Stop" the Web Servers that VS opens when you are debugging a web
> service within the IDE
> This is not pratical at all. Have any of you experienced the same problem?
> Is there a solution for this?
> I think that I may be doing something wrong. It is prety cumbersome to
> develop a web service, doing deployments, attaching to process and so on
> to properly debug an application.
> Any thoughts?
> Regards,
> Robson Siqueira
> Enterprise Architect
>