Error when using SPMetal in SharePoint 2010 with VS 2010 Beta 2

Hi,

If you tried to create proxy classes using SPMetal command line tool in SharePoint 2010 using VS 2010 or the command line using this command:

SPMetal /web:http://MyServer:PORT:1000/TestSite /code:TestSite.cs

Error:
“The Web application at http://MYSITE could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.”

The solution for this problem after i spent almost 1 hour to figure out what is the problem,the problem is that your site doesn’t get the username and password from the SPMetal tool, and you have to provide it in the command itself.


SPMetal /web:http://MyServer:PORT:1000/TestSite /code:TestSite.cs /username:DOMAIN\mostafa /password:testpassword123


Hope this helps.


Regards,
Mostafa arafa

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>