error with msdn example code 'fun with soap extensions'

Discussion in 'ASP .Net Web Services' started by smarty, May 20, 2006.

  1. smarty

    smarty Guest

    smarty, May 20, 2006
    #1
    1. Advertising

  2. smarty

    smarty Guest

    Hi,

    I don't know what was going on with that link it directs you to the article
    just below the one I was using and the URL doesn't change when I click on the
    correct article. I clicked email a friend and copied the link from there,
    this link should take you to the correct page.

    http://msdn.microsoft.com/library/en-us/dnaspnet/html/asp03222001.asp?frame=true&_r=1


    "Gaurav Vaish (EduJini.IN)" wrote:

    > Couldn't locate the line in the example mentioned.
    >
    > And there's no extra code to download... or am I missing anything?
    >
    >
    > --
    > Happy Hacking,
    > Gaurav Vaish
    > http://www.mastergaurav.org
    > http://www.edujini.in
    > -------------------
    >
    >
    > "smarty" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > I am trying to use soap extensions and have been looking at an example
    > > 'fun
    > > with soap extensions'
    > >
    > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp02222001.asp
    > >
    > > I am having trouble with two statements in the code (statement shown
    > > below),
    > > that tries to set a read only attribute of the soapmessage class. Is
    > > there
    > > something I am doing wrong here or is the code incorrect?
    > >
    > > message.Stream = newStream;
    > >
    > > Thanks

    >
    >
    >
     
    smarty, May 21, 2006
    #2
    1. Advertising

  3. smarty

    smarty Guest

    Thanks for the reply. I thought it may be easier to start with modules and
    then get soap extensions to work.

    I have been following code examples in a .NET XML web services book and have
    created a dll library file called Notashop.Wscr.c10.SimpleModule.dll and then
    copied it into the bin directory of a web application.

    I then modified the web.config file as follows

    <configuration>
    <system.web>
    <httpModules>
    <add name="SimpleModule" type="SimpleModule,
    Notashop.Wscr.c10.SimpleModule" />
    </httpModules>
    </system.web>
    </configuration>

    When I run the application it returns the following error.

    Description: An error occurred during the processing of a configuration file
    required to service this request. Please review the specific error details
    below and modify your configuration file appropriately.

    Parser Error Message: Could not load type 'Notashop.Wscr.c10.SimpleModule'.

    Source Error:


    Line 4: <!--Setup handlers-->
    Line 5: <httpHandlers>
    Line 6: <add verb="*" path="*.aspx"
    type="Notashop.Wscr.c10.SimpleModule"/>
    Line 7: </httpHandlers>
    Line 8: <!--Specify debug mode-->


    Source File: C:\Documents and Settings\GBstsma.NMEA\my documents\visual
    studio 2005\WebSites\testwebapp1\web.config Line: 6

    Is this a problem with the web application configuration i.e. web.config
    file or the dll itself. Not sure how I can debug this one.

    Any help appreciated
    "Gaurav Vaish (EduJini.IN)" wrote:

    > That example is terribly wrong with several bugs.
    >
    > You may want to check the documentation of SoapExtension class and its
    > ProcessMessage method. A better example is provided there.
    >
    >
    >
    > --
    > Happy Hacking,
    > Gaurav Vaish
    > http://www.mastergaurav.org
    > http://www.edujini.in
    > -------------------
    >
    >
    > "smarty" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > I don't know what was going on with that link it directs you to the
    > > article
    > > just below the one I was using and the URL doesn't change when I click on
    > > the
    > > correct article. I clicked email a friend and copied the link from there,
    > > this link should take you to the correct page.
    > >
    > > http://msdn.microsoft.com/library/en-us/dnaspnet/html/asp03222001.asp?frame=true&_r=1
    > >
    > >
    > > "Gaurav Vaish (EduJini.IN)" wrote:
    > >
    > >> Couldn't locate the line in the example mentioned.
    > >>
    > >> And there's no extra code to download... or am I missing anything?
    > >>
    > >>
    > >> --
    > >> Happy Hacking,
    > >> Gaurav Vaish
    > >> http://www.mastergaurav.org
    > >> http://www.edujini.in
    > >> -------------------
    > >>
    > >>
    > >> "smarty" <> wrote in message
    > >> news:...
    > >> > Hi,
    > >> >
    > >> > I am trying to use soap extensions and have been looking at an example
    > >> > 'fun
    > >> > with soap extensions'
    > >> >
    > >> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp02222001.asp
    > >> >
    > >> > I am having trouble with two statements in the code (statement shown
    > >> > below),
    > >> > that tries to set a read only attribute of the soapmessage class. Is
    > >> > there
    > >> > something I am doing wrong here or is the code incorrect?
    > >> >
    > >> > message.Stream = newStream;
    > >> >
    > >> > Thanks
    > >>
    > >>
    > >>

    >
    >
    >
    >
     
    smarty, May 21, 2006
    #3
  4. smarty

    smarty Guest

    I have realised what the problem was. I used a namespace so it needs to be
    namespace.class in web.config

    Thanks

    "smarty" wrote:

    > Thanks for the reply. I thought it may be easier to start with modules and
    > then get soap extensions to work.
    >
    > I have been following code examples in a .NET XML web services book and have
    > created a dll library file called Notashop.Wscr.c10.SimpleModule.dll and then
    > copied it into the bin directory of a web application.
    >
    > I then modified the web.config file as follows
    >
    > <configuration>
    > <system.web>
    > <httpModules>
    > <add name="SimpleModule" type="SimpleModule,
    > Notashop.Wscr.c10.SimpleModule" />
    > </httpModules>
    > </system.web>
    > </configuration>
    >
    > When I run the application it returns the following error.
    >
    > Description: An error occurred during the processing of a configuration file
    > required to service this request. Please review the specific error details
    > below and modify your configuration file appropriately.
    >
    > Parser Error Message: Could not load type 'Notashop.Wscr.c10.SimpleModule'.
    >
    > Source Error:
    >
    >
    > Line 4: <!--Setup handlers-->
    > Line 5: <httpHandlers>
    > Line 6: <add verb="*" path="*.aspx"
    > type="Notashop.Wscr.c10.SimpleModule"/>
    > Line 7: </httpHandlers>
    > Line 8: <!--Specify debug mode-->
    >
    >
    > Source File: C:\Documents and Settings\GBstsma.NMEA\my documents\visual
    > studio 2005\WebSites\testwebapp1\web.config Line: 6
    >
    > Is this a problem with the web application configuration i.e. web.config
    > file or the dll itself. Not sure how I can debug this one.
    >
    > Any help appreciated
    > "Gaurav Vaish (EduJini.IN)" wrote:
    >
    > > That example is terribly wrong with several bugs.
    > >
    > > You may want to check the documentation of SoapExtension class and its
    > > ProcessMessage method. A better example is provided there.
    > >
    > >
    > >
    > > --
    > > Happy Hacking,
    > > Gaurav Vaish
    > > http://www.mastergaurav.org
    > > http://www.edujini.in
    > > -------------------
    > >
    > >
    > > "smarty" <> wrote in message
    > > news:...
    > > > Hi,
    > > >
    > > > I don't know what was going on with that link it directs you to the
    > > > article
    > > > just below the one I was using and the URL doesn't change when I click on
    > > > the
    > > > correct article. I clicked email a friend and copied the link from there,
    > > > this link should take you to the correct page.
    > > >
    > > > http://msdn.microsoft.com/library/en-us/dnaspnet/html/asp03222001.asp?frame=true&_r=1
    > > >
    > > >
    > > > "Gaurav Vaish (EduJini.IN)" wrote:
    > > >
    > > >> Couldn't locate the line in the example mentioned.
    > > >>
    > > >> And there's no extra code to download... or am I missing anything?
    > > >>
    > > >>
    > > >> --
    > > >> Happy Hacking,
    > > >> Gaurav Vaish
    > > >> http://www.mastergaurav.org
    > > >> http://www.edujini.in
    > > >> -------------------
    > > >>
    > > >>
    > > >> "smarty" <> wrote in message
    > > >> news:...
    > > >> > Hi,
    > > >> >
    > > >> > I am trying to use soap extensions and have been looking at an example
    > > >> > 'fun
    > > >> > with soap extensions'
    > > >> >
    > > >> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp02222001.asp
    > > >> >
    > > >> > I am having trouble with two statements in the code (statement shown
    > > >> > below),
    > > >> > that tries to set a read only attribute of the soapmessage class. Is
    > > >> > there
    > > >> > something I am doing wrong here or is the code incorrect?
    > > >> >
    > > >> > message.Stream = newStream;
    > > >> >
    > > >> > Thanks
    > > >>
    > > >>
    > > >>

    > >
    > >
    > >
    > >
     
    smarty, May 21, 2006
    #4
  5. Hi Smarty,

    As for SOAP Extension, you can view the following msdn documentation which
    has some detailed introduction and sample code in it.

    #SOAP Message Modification Using SOAP Extensions
    http://msdn2.microsoft.com/en-us/library/esw638yk(VS.80).aspx

    Also, there are some 3rd party samples over internet:

    #Web Services [Validation] and [Assert] Attributes
    http://www.pluralsight.com/samples.aspx?category=xml

    Hope this helps.

    Regards,

    Steven Cheng
    Microsoft Online Community Support


    ==================================================

    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.

    ==================================================


    This posting is provided "AS IS" with no warranties, and confers no rights.



    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    Steven Cheng[MSFT], May 22, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DM
    Replies:
    0
    Views:
    533
  2. =?Utf-8?B?Tml5YXpp?=

    ASP.NET web.config MSDN Example

    =?Utf-8?B?Tml5YXpp?=, Dec 6, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    5,038
    =?Utf-8?B?Tml5YXpp?=
    Dec 7, 2005
  3. Andy Fish
    Replies:
    65
    Views:
    1,759
    Mabden
    May 18, 2004
  4. dolphin
    Replies:
    4
    Views:
    320
    Jorgen Grahn
    Aug 25, 2007
  5. er
    Replies:
    2
    Views:
    509
Loading...

Share This Page