Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / October 2005

Tip: Looking for answers? Try searching our database.

Configuration error in Web.config file while accessing the webserv

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kaush - 15 Oct 2005 22:49 GMT
Hi all,

        I am creating a webservice to accept SOAP messages, parse the
message and send a SOAP response back to the client accessing my web service
using WSE-2 in ASP.NET.
        I am creating a class which derives from "SoapReceiver" class and
do the processing here. To register this class by using the HTTP protocol, I
am editing the "web.config" file. I am adding an "add" element to this config
file as follows:
        <httpHandlers>
             <add verb="*" path="MyReceiver.ashx"
type="CodeService.HttpService"/>
        </httpHandlers>

Here "HttpService" is the class I have created in "CodeService" namespace.
Also I am adding a "configSections" element to the "configuration" section of
the "web.config" file to add microsoft.web.services2 configuration section.

When I try accessing this webservice from a browser say like
"http://localhost/CodeService/CodeWebService.asmx", I get an error

Parser Error Message: Could not load type CodeService.HttpService from
assembly System.Web, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a.

Could anyone please let me know where I am going wrong?

Thanks,
kaush
Pablo Cibraro - 17 Oct 2005 14:23 GMT
Hi Kaush,
You need to specify the fully qualified assembly name for that type. You had
specify only the typename so ASP.NET is trying to get that type from
System.Web.

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax

> Hi all,
>
[quoted text clipped - 30 lines]
> Thanks,
> kaush
Kaush - 17 Oct 2005 17:56 GMT
Hi Pablo,

             Thanks for the information. But still it is not working. I am
not sure where I am going wrong.

Now I do this :

  <httpHandlers>
         <add verb="*" path="*.ashx"
type="SOAPSERVEMON.HttpService,Microsoft.Web.Services2, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </httpHandlers>

Tha above I add in the <system.web> section.

and also I add the following to
  <configSections>
    <section name="microsoft.web.services2"            
type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration,Microsoft.Web.Services2,
Version=2.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" />
  </configSections>  to the <configuration> section.

Some information on my class:
"HttpService" class which I defined in "SOAPSERVEMON" namespace is derived
from "Soapservice". "Soapservice" is found in
"Microsoft.Web.Services2.Messaging" namespace.

> Hi Kaush,
> You need to specify the fully qualified assembly name for that type. You had
[quoted text clipped - 39 lines]
> > Thanks,
> > kaush
Pablo Cibraro - 17 Oct 2005 20:16 GMT
I mean, you have to specify the assembly name for the type
"SOAPSERVEMON.HttpService". It's a custom type defined by you so it is not
included in the WSE assembly.
The configuration should look like this:

  <httpHandlers>
         <add verb="*" path="*.ashx"
type="SOAPSERVEMON.HttpService,YourAssembly"/>
  </httpHandlers>

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax

> Hi Pablo,
>
[quoted text clipped - 71 lines]
>> > Thanks,
>> > kaush

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.