Solved

Exception thrown when creating an instance of a web service

Posted on 2008-06-22
5
415 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 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