By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,720 Members | 2,185 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,720 IT Pros & Developers. It's quick & easy.

Problem converting webservice from VS 2003 to VS 2005

P: n/a
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
Share this Question
Share on Google+
9 Replies


P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.