Webservice calling the wrong web.config

F

Frank Nesse

I have created a ASP.Net Webapplication and a ASP.NET webservice
project in one Visual Studio solution. In the web.config of the
webservice I have defined an AppSetting tag where I store the
connection string to the database.
However, when the app is calling the service, the service is reading
the app's web.config and not it's own web.config. Hence, the
connection string is returned as null.
What should I do to let the service use it's own web.config?
 
F

Frank Nesse

Well OK, that's an idea, but still, why is the service calling the
app's web.config. Because of the service proxy that is included in the
app? But then, how can you use web.config in a webservice?
 
F

Frank Nesse

I have tried to split the app and the service in two different
solutions, but this doesn't help. I still get a null value returned.
Another drawback now is that I cannot debug the webservice anymore
when running the app.
In my opinion there should be a way to tell the webservice to read its
own web.config, instead of the app's, but how?
 
J

Jaydeep

To test your webservice separately, create a html interface (like for
example if your webservice accepts 2 parameters then create 2 text boxes for
the same with the same name as parameter name) and put a submit button, and
in form's action give your webservice asmx path, and check for the rquired
output.

OR

call a webservice like this, by substituting your values.

http://localhost/fileName.asmx/functionName?parameter1=Jay

thanks
Jaydeep Vaze
Solversa Technologies
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top