Solved

Exception thrown when creating an instance of a web service

Posted on 2008-06-22
5
414 Views
Last Modified: 2008-06-23
Hi,

I have a peculiar problem. When running my Windows Forms application (C# 2.0) from within VS2005, any call to my Web Service works as it should.
However, when running my compiled .exe, an exception is thrown (see below). The .exe file is built using NAnt.. so my first guess would be that I'm perhaps missing some dll.. but I can't seem to find a solution.

Any help is highly appretiated.
Exception:    vid System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
   vid System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
   vid System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
   vid System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)
   vid System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
   vid System.Web.Services.Protocols.SoapClientType..ctor(Type type)
   vid System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
   vid ShrinkMyPhoto.Service.se.diod.services.MailService..ctor()
   vid ShrinkMyPhoto.Service.ChooseImageSizeService.SendEmail(String user, String email, String regkey, List`1 images, String mailfrom, String mailto, String mailsubject, String mailbody)

Open in new window

0
Comment
Question by:oxyoo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 10

Author Comment

by:oxyoo
ID: 21842312
The exception is thrown when I try and create an instance of the web service.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 21844878
1) I haven't seen that exception, but there doesn't appear to be any real exception message with the stack trace.

2) Is ShrinkMyPhoto.Service.ChooseImageSizeService your web service?

3) What is happening in the SendEmail method?
0
 
LVL 10

Author Comment

by:oxyoo
ID: 21845213
2) ShrinkMyPhoto.Service is a class library. ChooseImageSizeService is an ordinary class.

3) Within the SendEmail method, what I do is that I create an object of my Web Service
do some image serialization and then call my web service method.

The thing is that when I'm debugging, it won't get pass my first line of code which is:
MailService mailService = new MailService();

Now, MailService is my Web Service, which means that I can't event create an instance
of it.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 21845335
Can you answer #1 better, and give the full exception message, and not the stack trace?
0
 
LVL 10

Author Comment

by:oxyoo
ID: 21845431
Sorry about that. I'm feeling a bit dense here, thought I'd outputed the exception message but apparently I had not.
I fixed that and now it's telling me a dll file missing, Should be ok now as soon as I add a reference to it.

Thanks for your time.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Change to file doesn't show up 16 73
JQuery Detecting page post back 6 19
C# Formatting DateTime String Value 5 50
How to force output to ascii 2 32
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question