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

Posted By  Mostafa Elzoghbi On 16 Jun 2010 11:06:41
emailbookmarkadd commentsprint
No of Views:919
Bookmarked:0 times
Votes:0 times

Introduction

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."

Solution

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.

Sign Up to vote for this article
Other popular Tips/Tricks
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top