.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Post New Web Links

Cannot Add New Web in C#

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :C#
 

I'm having a problem creating a new web via a workflow custom action.  In my library, I have this code:

subSite = projectSite.Webs.Add(projectID, projectID + " " + projectName, projectID, 1033, template, false, false);
              

The project ID is a string with only numbers and a dash.  The Project Name doesn't contain any weird characters (I can run the c# code successfully with those values from visual studio in a console application no problem).

When the workflow runs, it errors and tells me: The URL '/projects/09-0006.04 ' is invalid. It may contain illegal characters, or be too long.

I did recently break "projects" into its own site collection, but I'm not entirely sure how that would effect the code.




View Complete Post


More Related Resource Links

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend