Generation on simple ASMX - projectId error

Topics: General Discussion Forum, July and December Releases Forum, Service Factory Modeling Edition Forum
Jan 24, 2009 at 5:01 AM
Error    3    System.ArgumentNullException: Value cannot be null.
Parameter name: projectId
   at Microsoft.Practices.ServiceFactory.RecipeFramework.Extensions.ProjectMapping.Helpers.GuidGuard.GuidNotEmpty(Guid guidValue, String guidName)
   at Microsoft.Practices.ServiceFactory.RecipeFramework.Extensions.ProjectMapping.ProjectMappingManager.GetProjectRoles(String projectMappingTableName, Guid projectId)
   at Microsoft.Practices.ServiceFactory.References.ProjectIsInRoleReference.IsEnabledFor(Object target)        0    0   

What is the projectId?  I have looked all over and do not see any projectID. Yet, when I try to generate it says it cannot be null.  When I click "Validate All" there are no problems.

I search Google and all, but I did not find a solution.  Thank you if you know what the problem is.
Jan 24, 2009 at 5:04 PM

This is the ID that VS set to each proj file. This ID is used in the mapping manifest file that WSSF uses for mapping contracts and other design artifacts to each of your projects in the solution. You may find a recipe that will help to create this mapping for you, including the project IDs if you right click on a solution folder you may see an option named "Populate Project Mapping Table" that will generate a new mapping file with all the projects under that solution folder. Otherwise you may try looking into each proj file (at the top of each xml) and get this ID manually.


Jan 24, 2009 at 7:19 PM
Thanks a ton! I right clicked on the solution and clicked "Populate Project Mapping Table" and it works now.

Maybe you do not mind one more question?  I am not used to this type of layout and solution.  It does not look like the usual asmx web service.

Can I export all of the generated files into a regular asmx web project, or do I need to add my business logic in WSSF?  I cannot even find the asmx file in this solution to run it.  Sorry if this is basic, or I am missing the point of WSSF.
Jan 26, 2009 at 7:08 PM
You can freely export your generated files to your asmx file. However, WSSF gives you generation for asmx (alogn with WCF) and you don't need to put all your classes in one asmx project (loke the host project in a WSSF solution). With the WSSF pattern you can have a good separation of concerns and use proven architecture practices.