1

Closed

Root namespace missing in generated config files for VB.NET projects

description

I've run into the same problem with wscf.Blue and VB.NET projects. It looks like there is a problem/bug in the way the .SVC file is generated because it is missing the Project Name in the Service attribute, so the service Type can't be found.
 
Luckily, there is a simple workaround for this issue.
 
Add the project name to the service attribute in the generated .SVC fileThe format is ProjectName.Namespace.ClassName
 
For example, change:<%@ ServiceHost Service="Namespace.Service.SampleWCF" %>
 
To:<%@ ServiceHost Service="ProjectName.Namespace.Service.SampleWCF" %>
 

 
There is another workaround related to this issue. When displaying the .SVC helper page, you may see a message "Metadata publishing for this service is currently disabled". This usually shows up when you don't have a MEX endpoint defined. However, even after you add the necessary settings for the MEX endpoint, you may still see this message.
 
It looks like there is also a problem with the way the output.config settings are generated, because the service name attribute is missing the Project Name as well.
 
To fix this, add the Project Name to the the service name attribute in theweb.config:<service name="Namespace.Service.SampleWCF">
 
To:<service name="ProjectName.Namespace.Service.SampleWCF">
 
thinktecture folks, can you look into these problems with VB.NET projects?
Closed Feb 15, 2012 at 1:30 PM by alexmeyergleaves
For VB.NET projects the root namespace (i.e. project name) is prefixed to the user provided namespace when writing .config and .svc files.

comments

Sebastocrator wrote May 9, 2012 at 2:58 PM

Hello,

Although it's not clear to me if this issue wasn't solved after all, or that it's due to another issue, just thought I'd mention this:

Unfortunately, when building the solution in which this issue is solved, the namespace entered in the wizard seems to be ignored completely and only the root namespace is added to the generated service code, as well as to the .svc file. As a result, it now also breaks the partial class that's used for implementing the service methods.

alexmeyergleaves wrote May 9, 2012 at 3:51 PM

The issue has been fixed in the source code but the release it not yet available. I will be looking at Visual Studio 11 support soon and will be doing another build. If you need this sooner you could try building from the source.

wrote Feb 22, 2013 at 12:16 AM

wrote May 16, 2013 at 11:48 AM