473,320 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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
<soapExtensionTypes> 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
SecurityExtension is the SoapExtension class in the TheWebService namesapce:

<soapExtensionTypes>
<add type="TheWebService.SecurityExtension, TheWebService" priority="1"
group="high"/>
</soapExtensionTypes>

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 4412
"Symon" <Sy***@discussions.microsoft.com> wrote in message
news:79**********************************@microsof t.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
<soapExtensionTypes> 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="TheWebService.SecurityExtension" 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="TheWebService.SecurityExtension, TheWebService,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
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.Services and throws the error:

The value of the property 'type' cannot be parsed. The error is: Could not
load type
'Papa.Framework.Webservice.SoapExtensions.Unhandle dExceptionExtension' from
assembly 'System.Web.Services, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'.

So that doesn't work.

Symon.
"Martin Kulov" wrote:
"Symon" <Sy***@discussions.microsoft.com> wrote in message
news:79**********************************@microsof t.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
<soapExtensionTypes> 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="TheWebService.SecurityExtension" 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="TheWebService.SecurityExtension, TheWebService,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
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.SoapExtensionClass, 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.SoapExtensionClass,
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
<soapExtensionTypes> 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
SecurityExtension is the SoapExtension class in the TheWebService namesapce:

<soapExtensionTypes>
<add type="TheWebService.SecurityExtension, TheWebService" priority="1"
group="high"/>
</soapExtensionTypes>

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 soapExtensionType 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.SoapExtensionClass, 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.SoapExtensionClass,
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
<soapExtensionTypes> 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
SecurityExtension is the SoapExtension class in the TheWebService namesapce:

<soapExtensionTypes>
<add type="TheWebService.SecurityExtension, TheWebService" priority="1"
group="high"/>
</soapExtensionTypes>

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***@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...
Talking to myself now, but it turns out that for my solution to work I
*must*
publish the website *before* I add the soapExtensionType 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.SoapExtensionClass, 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.SoapExtensionClass,
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
<soapExtensionTypeselement 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
SecurityExtension is the SoapExtension class in the TheWebService namesapce:

<soapExtensionTypes>
<add type="TheWebService.SecurityExtension, TheWebService" priority="1"
group="high"/>
</soapExtensionTypes>

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.SoapExtensionClass, 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.SoapExtensionClass,
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
<soapExtensionTypeselement 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
SecurityExtension is the SoapExtension class in the TheWebService namesapce:
>
<soapExtensionTypes>
<add type="TheWebService.SecurityExtension, TheWebService" priority="1"
group="high"/>
</soapExtensionTypes>
>
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
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...
16
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...
1
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...
0
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...
1
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...
4
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...
0
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...
1
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...
2
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.