1

Target framwork 3.5 Platform Target - Any CPU

But on the top section (under configuration of build screen show Active(x86) under Platform).

I keep getting The web application http://nortel.nortelnetwork.com could not be found. I can resolve local dev url (http://srvNortel2344).

David Mike
  • 89
  • 3
  • 11
  • I have changed to x64 but still the same error. – David Mike Jul 06 '11 at 17:44
  • Is nortel.nortelnetwork.com local to your machine? What method are you calling that throws that error? – James Love Jul 06 '11 at 17:48
  • Is not on my local machine but I can access it through browser. I even took the console exe and ran it on the server and still get the same error. – David Mike Jul 06 '11 at 18:18
  • Why do you think this error has anything to do with Target CPU??? – Ryan Jul 07 '11 at 06:58
  • I have this error before I am setting target as x64. Its works fine after i changed to x64 but still i have this error when i am login with ordinary user account. please tell me the solution. thanks in advance –  Dec 26 '11 at 14:16

3 Answers3

3

you can only use sharepoint's server side api on the server sharepoint is running on. for communication from another machine to sharepoint you need to use the webservices or, if you are running SP2010, the client framework.

Edit:

  • If you try to access an url from the server itself through a hostname other than the real machine name it might be the DisableLoopbackCheck issue. In (ASP).NET, it is not permitted to access a website using a host header other than the actual machine name when running on that machine. More info here: support.microsoft.com/kb/896861 i.e.: Machine name = SPSRVR01. The website is running under hostheader mywebsite. If this is the case, you need to either disable the loopbackcheck or add the allowed hostheader as a BackConnectionHostName (see same article).

  • Also, you can only access the current farm using the sharepoint server API. You cannot open sites in another farm, even though SharePoint is Running on that machine.

  • Also, is your Console App a .NET Framework 4 based app? If so, you have to revert to .NET 3.5SP1

Colin
  • 4,665
  • 18
  • 26
0

I have seen an error similar to this in the past if an alternate access mapping is missing for the URL.

Steve P
  • 2,358
  • 17
  • 21
  • I went to CA and alternate access mappings page and I can see all the urls are listed. Particularly the one I am interested in. zone is set to default. – David Mike Jul 06 '11 at 20:26
0

I know this is not ordinary answer but the following worked for me.

I logged in to the server with the farm account. (IMPORTANT: FARM ACCOUNT) I placed the console exe in the inetpub....\script directory and ran it from there. It runs fine from that location and didnt complaint.

David Mike
  • 89
  • 3
  • 11