473,661 Members | 2,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem converting webservice from VS 2003 to VS 2005

I've got a web service project that was built under VS 2003 which has a
SoapExtension in the project. The SoapExtension is registered in the
<soapExtensionT ypes> element of the web.config and has worked fine for some
time.

Recently we tryed to update the project to VS 2005 and run it under ASP.NET
2.0, but now we get a compile time exception:

"The value of the property 'type' cannot be parsed. The error is: Could not
load file or assembly 'TheWebService' or one of its dependencies. The system
cannot find the file specified."

The registration of the SoapExtension in the web.config is like this where
TheWebService is the name of the web service application and
SecurityExtensi on is the SoapExtension class in the TheWebService namesapce:

<soapExtensionT ypes>
<add type="TheWebSer vice.SecurityEx tension, TheWebService" priority="1"
group="high"/>
</soapExtensionTy pes>

The code has not changed and I'm guessing that this is due to changes in the
way that ASP.NET handles it's compilation.

Is it no longer possible to register a SoapExtension that is in the current
assembly for a web service? I *really* don't want to move the extension out
to another assembly.

Hoping someone out there can provide a hint on this.

Cheers,

Symon.

Mar 15 '06 #1
9 4434
"Symon" <Sy***@discussi ons.microsoft.c om> wrote in message
news:79******** *************** ***********@mic rosoft.com...
I've got a web service project that was built under VS 2003 which has a
SoapExtension in the project. The SoapExtension is registered in the
<soapExtensionT ypes> element of the web.config and has worked fine for
some
time.

Recently we tryed to update the project to VS 2005 and run it under
ASP.NET
2.0, but now we get a compile time exception:

"The value of the property 'type' cannot be parsed. The error is: Could
not
load file or assembly 'TheWebService' or one of its dependencies. The
system
cannot find the file specified."


Hi Simon,
have you tried to specify the type only by its class name. For example:

<add type="TheWebSer vice.SecurityEx tension" priority="1" group="high"/>

Please let us know.

Martin

Mar 16 '06 #2
Hi Symon,

If the assembly is strong named, specifying the assembly version,
strong name key and culture info is advisable, for example:

<add type="TheWebSer vice.SecurityEx tension, TheWebService,
Version=1.0.500 0.0, Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
priority="1" group="high"/>

Also, its possible to configure the assembly loader (fusion) to log
additional information to disk about binding failures via registry
settings:

http://blogs.msdn.com/suzcook/archiv.../29/57120.aspx

This tool can also be used to log all successful binding attempts, so
you can see the exact assembly versions + locations that are loaded.

HTH.

Cheers,
Matt

Mar 19 '06 #3
Thanks Martin,

Unfortunately if you don't specify the assembly name it assumes that the
extension will be coming from System.Web.Serv ices and throws the error:

The value of the property 'type' cannot be parsed. The error is: Could not
load type
'Papa.Framework .Webservice.Soa pExtensions.Unh andledException Extension' from
assembly 'System.Web.Ser vices, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= b03f5f7f11d50a3 a'.

So that doesn't work.

Symon.
"Martin Kulov" wrote:
"Symon" <Sy***@discussi ons.microsoft.c om> wrote in message
news:79******** *************** ***********@mic rosoft.com...
I've got a web service project that was built under VS 2003 which has a
SoapExtension in the project. The SoapExtension is registered in the
<soapExtensionT ypes> element of the web.config and has worked fine for
some
time.

Recently we tryed to update the project to VS 2005 and run it under
ASP.NET
2.0, but now we get a compile time exception:

"The value of the property 'type' cannot be parsed. The error is: Could
not
load file or assembly 'TheWebService' or one of its dependencies. The
system
cannot find the file specified."


Hi Simon,
have you tried to specify the type only by its class name. For example:

<add type="TheWebSer vice.SecurityEx tension" priority="1" group="high"/>

Please let us know.

Martin

Mar 23 '06 #4
Hi Matt,

My assembly is not signed, so that could be a problem. I'll try signing it
and adding the extra info as you have suggested, but this is still an issue
as the original Framework 1.1 version wasn't signed and didn't need the
additional information.

I'll keep you posted.

Symon.
"Matt Dunn" wrote:
Hi Symon,

If the assembly is strong named, specifying the assembly version,
strong name key and culture info is advisable, for example:

<add type="TheWebSer vice.SecurityEx tension, TheWebService,
Version=1.0.500 0.0, Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
priority="1" group="high"/>

Also, its possible to configure the assembly loader (fusion) to log
additional information to disk about binding failures via registry
settings:

http://blogs.msdn.com/suzcook/archiv.../29/57120.aspx

This tool can also be used to log all successful binding attempts, so
you can see the exact assembly versions + locations that are loaded.

HTH.

Cheers,
Matt

Mar 23 '06 #5
Ok, problem solved. I stumbled upon the answer when I tried publishing the
web service and could finally see all the DLLs that were generated.

For those who want to know what the problem was and how to fix it...here goes:

In ASP.NET 1.1 all code was compiled into a single assembly, the name of
which could be specified in the project properties. Normally one would
define a SoapExtension type in the web.config using <add
type="Namespace .SoapExtensionC lass, AssemblyName" priority="1"
group="0"/>
In ASP.NET 2.0 code for individual pages are compiled into their own
assemblies and all the code in the App_Code folder is compiled into the
App_Code.dll assembly. Because of this the definition of the SoapExtesion
type in the web.config needs to be <add type="Namespace .SoapExtensionC lass,
App_Code" priority="1" group="0"/> because, in my case, the App_Code folder contains the code file which defines the SoapExtension class.
This is a fairly minor change, but it took weeks to establish the cause of
this problem. Hopefully this will be googled and can provide help to someone
else in the future!

Cheers,

Symon.


"Symon" wrote:
I've got a web service project that was built under VS 2003 which has a
SoapExtension in the project. The SoapExtension is registered in the
<soapExtensionT ypes> element of the web.config and has worked fine for some
time.

Recently we tryed to update the project to VS 2005 and run it under ASP.NET
2.0, but now we get a compile time exception:

"The value of the property 'type' cannot be parsed. The error is: Could not
load file or assembly 'TheWebService' or one of its dependencies. The system
cannot find the file specified."

The registration of the SoapExtension in the web.config is like this where
TheWebService is the name of the web service application and
SecurityExtensi on is the SoapExtension class in the TheWebService namesapce:

<soapExtensionT ypes>
<add type="TheWebSer vice.SecurityEx tension, TheWebService" priority="1"
group="high"/>
</soapExtensionTy pes>

The code has not changed and I'm guessing that this is due to changes in the
way that ASP.NET handles it's compilation.

Is it no longer possible to register a SoapExtension that is in the current
assembly for a web service? I *really* don't want to move the extension out
to another assembly.

Hoping someone out there can provide a hint on this.

Cheers,

Symon.

Mar 23 '06 #6
Talking to myself now, but it turns out that for my solution to work I *must*
publish the website *before* I add the soapExtensionTy pe directive to the
web.config. I'm not sure why this is, since I can delete the published files
and still rebuild...there must be some cached copy of the App_Code.dll
somewhere that ASP.NET is using.

This behavior looks a little hinky to me - maybe it needs examining further.

Symon.

"Symon" wrote:
Ok, problem solved. I stumbled upon the answer when I tried publishing the
web service and could finally see all the DLLs that were generated.

For those who want to know what the problem was and how to fix it...here goes:

In ASP.NET 1.1 all code was compiled into a single assembly, the name of
which could be specified in the project properties. Normally one would
define a SoapExtension type in the web.config using <add
type="Namespace .SoapExtensionC lass, AssemblyName" priority="1"
group="0"/>


In ASP.NET 2.0 code for individual pages are compiled into their own
assemblies and all the code in the App_Code folder is compiled into the
App_Code.dll assembly. Because of this the definition of the SoapExtesion
type in the web.config needs to be <add type="Namespace .SoapExtensionC lass,
App_Code" priority="1"
group="0"/> because, in my case, the App_Code folder contains the code file which defines the SoapExtension class.


This is a fairly minor change, but it took weeks to establish the cause of
this problem. Hopefully this will be googled and can provide help to someone
else in the future!

Cheers,

Symon.


"Symon" wrote:
I've got a web service project that was built under VS 2003 which has a
SoapExtension in the project. The SoapExtension is registered in the
<soapExtensionT ypes> element of the web.config and has worked fine for some
time.

Recently we tryed to update the project to VS 2005 and run it under ASP.NET
2.0, but now we get a compile time exception:

"The value of the property 'type' cannot be parsed. The error is: Could not
load file or assembly 'TheWebService' or one of its dependencies. The system
cannot find the file specified."

The registration of the SoapExtension in the web.config is like this where
TheWebService is the name of the web service application and
SecurityExtensi on is the SoapExtension class in the TheWebService namesapce:

<soapExtensionT ypes>
<add type="TheWebSer vice.SecurityEx tension, TheWebService" priority="1"
group="high"/>
</soapExtensionTy pes>

The code has not changed and I'm guessing that this is due to changes in the
way that ASP.NET handles it's compilation.

Is it no longer possible to register a SoapExtension that is in the current
assembly for a web service? I *really* don't want to move the extension out
to another assembly.

Hoping someone out there can provide a hint on this.

Cheers,

Symon.

Mar 23 '06 #7
"Symon" <Sy***@discussi ons.microsoft.c om> wrote in message
news:93******** *************** ***********@mic rosoft.com...
Talking to myself now, but it turns out that for my solution to work I
*must*
publish the website *before* I add the soapExtensionTy pe directive to the
web.config. I'm not sure why this is, since I can delete the published
files
and still rebuild...there must be some cached copy of the App_Code.dll
somewhere that ASP.NET is using.


Symon,

Thanks for the update.

Martin
Mar 23 '06 #8
Hi Symon,

Thanks for your posting,

The value of the property 'type' cannot be parsed. The error is: Could not
load file or assembly 'App_Code' or one of its dependencies. The system
cannot find the file specified. I Get this error still can thoughts on this

Thanks
Rags

"Symon" wrote:
Ok, problem solved. I stumbled upon the answer when I tried publishing the
web service and could finally see all the DLLs that were generated.

For those who want to know what the problem was and how to fix it...here goes:

In ASP.NET 1.1 all code was compiled into a single assembly, the name of
which could be specified in the project properties. Normally one would
define a SoapExtension type in the web.config using <add
type="Namespace .SoapExtensionC lass, AssemblyName" priority="1"
group="0"/>

In ASP.NET 2.0 code for individual pages are compiled into their own
assemblies and all the code in the App_Code folder is compiled into the
App_Code.dll assembly. Because of this the definition of the SoapExtesion
type in the web.config needs to be <add type="Namespace .SoapExtensionC lass,
App_Code" priority="1"
group="0"/because, in my case, the App_Code folder contains the code file which defines the SoapExtension class.

This is a fairly minor change, but it took weeks to establish the cause of
this problem. Hopefully this will be googled and can provide help to someone
else in the future!

Cheers,

Symon.


"Symon" wrote:
I've got a web service project that was built under VS 2003 which has a
SoapExtension in the project. The SoapExtension is registered in the
<soapExtensionT ypeselement of the web.config and has worked fine for some
time.

Recently we tryed to update the project to VS 2005 and run it under ASP.NET
2.0, but now we get a compile time exception:

"The value of the property 'type' cannot be parsed. The error is: Could not
load file or assembly 'TheWebService' or one of its dependencies. The system
cannot find the file specified."

The registration of the SoapExtension in the web.config is like this where
TheWebService is the name of the web service application and
SecurityExtensi on is the SoapExtension class in the TheWebService namesapce:

<soapExtensionT ypes>
<add type="TheWebSer vice.SecurityEx tension, TheWebService" priority="1"
group="high"/>
</soapExtensionTy pes>

The code has not changed and I'm guessing that this is due to changes in the
way that ASP.NET handles it's compilation.

Is it no longer possible to register a SoapExtension that is in the current
assembly for a web service? I *really* don't want to move the extension out
to another assembly.

Hoping someone out there can provide a hint on this.

Cheers,

Symon.
Oct 9 '06 #9
More Information about the problem
This works fine when i add a Soap Extension in the Web Service. But i get
this error when add the extension in the ASP.NET 2.0 Web.config file

Thanks
Rags

"Rags" wrote:
Hi Symon,

Thanks for your posting,

The value of the property 'type' cannot be parsed. The error is: Could not
load file or assembly 'App_Code' or one of its dependencies. The system
cannot find the file specified. I Get this error still can thoughts on this

Thanks
Rags

"Symon" wrote:
Ok, problem solved. I stumbled upon the answer when I tried publishing the
web service and could finally see all the DLLs that were generated.

For those who want to know what the problem was and how to fix it...here goes:

In ASP.NET 1.1 all code was compiled into a single assembly, the name of
which could be specified in the project properties. Normally one would
define a SoapExtension type in the web.config using <add
type="Namespace .SoapExtensionC lass, AssemblyName" priority="1"
group="0"/>
In ASP.NET 2.0 code for individual pages are compiled into their own
assemblies and all the code in the App_Code folder is compiled into the
App_Code.dll assembly. Because of this the definition of the SoapExtesion
type in the web.config needs to be <add type="Namespace .SoapExtensionC lass,
App_Code" priority="1"
group="0"/because, in my case, the App_Code folder contains the code file which defines the SoapExtension class.
This is a fairly minor change, but it took weeks to establish the cause of
this problem. Hopefully this will be googled and can provide help to someone
else in the future!

Cheers,

Symon.


"Symon" wrote:
I've got a web service project that was built under VS 2003 which has a
SoapExtension in the project. The SoapExtension is registered in the
<soapExtensionT ypeselement of the web.config and has worked fine for some
time.
>
Recently we tryed to update the project to VS 2005 and run it under ASP.NET
2.0, but now we get a compile time exception:
>
"The value of the property 'type' cannot be parsed. The error is: Could not
load file or assembly 'TheWebService' or one of its dependencies. The system
cannot find the file specified."
>
The registration of the SoapExtension in the web.config is like this where
TheWebService is the name of the web service application and
SecurityExtensi on is the SoapExtension class in the TheWebService namesapce:
>
<soapExtensionT ypes>
<add type="TheWebSer vice.SecurityEx tension, TheWebService" priority="1"
group="high"/>
</soapExtensionTy pes>
>
The code has not changed and I'm guessing that this is due to changes in the
way that ASP.NET handles it's compilation.
>
Is it no longer possible to register a SoapExtension that is in the current
assembly for a web service? I *really* don't want to move the extension out
to another assembly.
>
Hoping someone out there can provide a hint on this.
>
Cheers,
>
Symon.
>
Oct 9 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
768
by: Davie | last post by:
I want to authorise a user of a web service by using the AuthHeaderValue for some reason I keep getting a null reference exception when I try to run the following code: It seems to work fine on a .NET Framework application, but just not on the .NET CF version. Can anyone suggest anything that might be wrong with the code? (I could post the app and webservice, but i was hoping that you might have noticed something from the supplied...
16
4902
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by Microsoft must be installed on their servers. Now german Umlaute (ä, ü, ö) and quotes are returned incorrectly in SOAP fault responses. This can be easily verified: Implement the following in a web service method (just raises a SOAPException with a...
1
4325
by: PrettySneaky | last post by:
I currently working on a webservice which calls a DCOM object! The webproject works just fine when i run it in Visual studio 2005. However due to some compability issues with .NET 2.0 and the server which my webservice uses I have to use Visual Studio 2003 and a older .NET framework (.NET 1.1 or something, not important). Now it's impossible to run the webservices and I believe it has to do with something with the security settings of...
0
1706
by: Rich | last post by:
(1) Is there a better place to pose the question below? (2) I am starting to convert my enterprise solution from VS 2003 (.NET v1.1.4322) to VS 2005 Professional (.NET v2.0.50727). The entire solution uses the following technologies - Windows Server 2003 Windows Mobile 2003 Windows XP Professional SP2 Windows 2000 Professional SP4 SQL Server 2000
1
1451
by: Blasting Cap | last post by:
I had a copy of a project that was working in Visual Studio 2003 and Framework 1.1. After a computer crash, I was given VS 2005 and am having more than a little difficulty getting things to open in VS 2005. At first, I tried converting the project. That failed (it brought in all the junk I had in my source folder). As Plan B, I created a new website, using Visual Web Developer, and
4
1779
by: Jay | last post by:
2.0 asp.net app (precomiled in 2005, not updateable, dll's in bin and then merged to one dll)... web app calls a 1.1 (compiled in 2003) webservice initialization webmethod (works). Second call to a different webmethod (does NOT work. The second webmethod uses session state (to re-connect individuals session back together) and crashes... Hypotheses include: can't use precompiled app in 2005 to call 1.1/2003 websevice that uses state....
0
1542
by: naveed | last post by:
I have been using a webservices of a compnay in Visual Studio 2003 without any problem. But recently I started to work with webservices in Viusal Studio 2005. I am getting a very strange problem that when i try to login with the login method of a webservice in Debug mode i always get a Timeout problem. But it works fine with i try to login without debug mode. I don´t know that whats wrong with VS 2005 debugger that why it´s not able to...
1
1952
by: Mahesh Devjibhai Dhola | last post by:
Hi, Scenario: The webservice was developed on windows 2000 Pro and deployed previously on windows XP pro for testing. We have tested for many days. The client for that service was 30+ and accessing the webservice each min. It was working 100% fine. Problem: But now in actual deployment, we have deployed webservice in Win Server 2003 and we have used all the default configurations. Now the clients are accessing that service the same way...
2
3837
by: cmrhema | last post by:
Hi, I have a webservice, which works fine. I am working in windows xp. I hosted the webservice by integrating with .mpp file using COM component and it works successfully. Now I uploaded into the server, its windows 2003 server. When I run the webservice it executes perfectly for the first time, whereas it does not execute from second time onwards. But the same webservice when worked from visual studio 2005 inside windows server 2003,...
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8630
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4343
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1740
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.