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 / May 2006

Tip: Looking for answers? Try searching our database.

error with msdn example code 'fun with soap extensions'

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
smarty - 20 May 2006 11:39 GMT
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/a
sp02222001.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
Gaurav Vaish (EduJini.IN) - 21 May 2006 10:18 GMT
Couldn't locate the line in the example mentioned.

And there's no extra code to download... or am I missing anything?

Signature

Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------

> Hi,
>
[quoted text clipped - 13 lines]
>
> Thanks
smarty - 21 May 2006 11:23 GMT
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

> Couldn't locate the line in the example mentioned.
>
[quoted text clipped - 17 lines]
> >
> > Thanks
Gaurav Vaish (EduJini.IN) - 21 May 2006 16:02 GMT
That example is terribly wrong with several bugs.

Signature

Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------

> Hi,
>
[quoted text clipped - 28 lines]
>> >
>> > Thanks
Gaurav Vaish (EduJini.IN) - 21 May 2006 16:03 GMT
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.

Signature

Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------

> Hi,
>
[quoted text clipped - 28 lines]
>> >
>> > Thanks
smarty - 21 May 2006 18:58 GMT
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

> That example is terribly wrong with several bugs.
>
[quoted text clipped - 33 lines]
> >> >
> >> > Thanks
smarty - 21 May 2006 19:48 GMT
I have realised what the problem was.  I used a namespace so it needs to be
namespace.class in web.config

Thanks

> Thanks for the reply.  I thought it may be easier to start with modules and
> then get soap extensions to work.
[quoted text clipped - 77 lines]
> > >> >
> > >> > Thanks
Steven Cheng[MSFT] - 22 May 2006 07:55 GMT
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.

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Gaurav Vaish (EduJini.IN) - 21 May 2006 16:03 GMT
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.

Signature

Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------

> Hi,
>
[quoted text clipped - 28 lines]
>> >
>> > Thanks

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.