LotusShiv 0 Newbie Poster

Scenario: I have a ASP.Net 3.5 (VS.Net 2008/C#) application. I have a webservice which I have marked with [ScriptService] attribute and also made sure that the <compilation debug=trus /> setting is in place in the webservice web.config configuration settings. I add the Script reference in the codebehind of my aspx page, instead of setting it directly on the aspx markup. Reason being I want to be able to read the webservice path off of my web.config of the website.

Test case 1: I build and deploy my website, where in the webservice assigned happens to be the webservice deployed on localhost. I have some page control events for which the event handler I have assigned calls the appropriate webservice method and I get the results.

Test case 2: I try to now run my application itself (instead of the deployed website) as I want to debug, that is where the issue arises. As I step through the AJAX generated code, when it tries to invoke the webmethod ( the invoke method - first parameter being this._get_path()) here it seems to strip the localhost and just returns /MyVirtualDir/Myservice.asmx as the path and when I proceed further, I get a 12030 error and nothing is returned for the webmethod call. And when I interrupt at this point before proceeding and reset in the QuickCheck window the path value to be the fully qualified one, I get the access denied error. Mind you my webservice has anonymous access (the default setting after deploying the webservice). FYI, the webmethod that I tried to debug is the same method for which I get the results in Test case 1.

I need to know what assumptions I am making are wrong in the second case and what I need to be doing. Any help is appreciated.

-- LotusShiv

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.