Wednesday, January 13, 2010

SharePoint Programming in 64bit environment

This is my first time to develop on a 64bit machine, so i started visual studio, wrote my framework, and created a unit test.

The test failed because of the following exception, while creating a new SPSite

The Web application at http://HostName:Port/ 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.

first thing came to my mind is that i am using a wrong URL, but it was the same URL i am using in the browser, so i created a new console application with the failed line of code

var site = new SPSite(“http://HostName:Port/”);

and guess what? it worked.

After some investigation i knew that MS UnitTest is not compatible with 64bit Process, so the test context runs as 32bit process which conflict with the SPSite object as it a COM unmanaged object.

Till now i have no solution for that but as i read NUnit is a great tool for testing with 64bit platform, so i will try it and get back with the results and solutions.

Related links:

1 comment:

  1. pg slot th เป็นเกมออนไลน์ ที่เกมบันเทิงใจยอดเยี่ยม เล่นแล้วได้จริง เครดิตฟรี 50 เล่นแล้วร่ำรวยทำให้คุณมั่งคั่งขึ้นได้ PG SLOT แค่เพียงคุณร่วมบันเทิงใจกับ สล็อต ต่างๆที่มีให้เล่น ทดลอง เล่น ฟรี ได้แล้ววันนี้

    ReplyDelete