Irtenbidea: System.IO.FileNotFoundException on “SPSite = new SPSite(url)”

UPDATE: Galdera hau argitaratua dut MSDN hemen (http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=2808543&SiteID=1&mode=1) and Michael Washam of Microsoft responded with a concise answer.

Web-zerbitzu gisa jarduteko sortu dut BDC errespetatzen fatxada to a SharePoint list. When I used this from my development environment, fina lan egin ezazu. Hori migratu dut zerbitzari berri bat, Errore hau aurkitu da I:

System.IO.FileNotFoundException: Web-aplikazio http://localhost/sandbox ezin izan da aurkitu. Ziurtatu idatzi duzula URL bezala. URL dira zerbitzatu behar lehendik dauden edukiak, sistema-administratzaileak berri baten eskaera URL mapping gehitzeko xedea aplikazioa beharko. Microsoft.SharePoint.SPSite at .. ctor(SPFarm baserriko, Uri requestUri, Boolearrak contextSite, SPUserToken userToken) Microsoft.SharePoint.SPSite at .. ctor(Katea requestUrl) Conchango.xyzzy.GetExistingDocument at(Katea minId, Katea maxId, Katea izenburua iragazkia) C:\Documents and Settings Paul My Documents Visual Studio 2005 Proiektuak xyzzy BDC_DocReview BDC_DocReview DocReviewFacade.asmx.cs:line 69

Hemen da line 69:

erabiliz (SPSite gune = new SPSite("http://localhost/sandbox"))

URL buruzko aldaera ezberdinak saiatu naiz, zerbitzari horrek benetako izena erabiltzen barne, Bere IP helbidea, amaierako an URL barrak, etc. I always got that error.

Erabiltzen dut Google to research it. Lots of people face this issue, edo aldakuntzak, baina inork ez zirudien izan da konpondu.

Tricksy MOSS emandako zehatza error, esaterako, ez zuen ez dela gertatzen me egiaztatzeko 12 hive logs. Azkenean, buruz 24 ordu ondoren nire lankide Horretarako gomendatzen dut, Out hautatuta dut 12 hive erregistroa, eta hau topatu:

Salbuespena gertatu tokiko baserriko eskuratzeko:
System.Security.SecurityException: Eskatutako erregistroan sarbidea ez dago baimendua.
System.ThrowHelper.ThrowSecurityException at(ExceptionResource baliabide) at
(Kate izena, Boolearrak idazgarria) at
(Kate izena) at
() at
() at
(SPFarm& Baserriko, Boolearra& isJoined)
Batzar Zona de huts egin zen:  MyComputer

Hau ireki ikerketa-bide berriak, beraz, itzuli zen nahi Google. Ekarri dit hau foroa post: http://forums.codecharge.com / posts.php?post_id = 67135. That didn’t really help me but it did start making me think there was a database and/or security issue. I soldiered on and Andrew Connell en post finally triggered the thought that I should make sure that the application pool’s identity account had appropriate access to the database. I thought it already did. Hala eta guztiz ere, nire lankide joan eta aplikazioa igerilekua nortasuna kontuan sarbide osoa eman SQL.

Bezain laster, aldaketa hori egin zuen, everything started working.

Zer gertatu da hurrengo onena da adierazita Haiku poema:

Arazoak planteatzeko eskuak.
You swing and miss. Try again.
Arrakasta! But how? Zergatik?

Berak ez zuen nahi, gauzak utzi bakarrik horrelako, gutxieneko beharrezko baimenik emateko nahiago (eta, seguruenik, blog sarrera bat idaztea begi batekin; Bere beat dut zulatu du, muhahahahaha!).

Ondoz baimenak kendu zuen app igerilekua nortasuna kontuan arte … there was no longer any explicit permission for the app pool identity account at all. The web service continued to work just fine.

We went and rebooted the servers. Everything continued to work fine.

Beraz,, to laburpena: we gave the app pool identity full access and then took it away. The web service started working and never stopped working. Bizarre.

Edozeinek daki zergatik lan egin behar bada,, Mesedez, utzi iruzkin bat.

</amaiera>

Technorati Tags:

11 buruzko gogoeta "Irtenbidea: System.IO.FileNotFoundException on “SPSite = new SPSite(url)”

  1. Fernando Gómez Flores

    Nice post, esker. Nire kasuan, nire arazoa zen webservice en apppool aldatzen SharePoint gune bilduma dela etortzeko konpondu.

    Cheers,
    Fernando. Gómez F.

    Erantzun
  2. Wilson Edgar

    Hi, Ere izan nuen, bera arazoa. SharePoint zerbitzari berean makina bitartean garatzen, ASP garapena Server nintzen erabiliz baimen desberdinekin ez zalantzarik ez berean identitate pean SharePoint gisa exekutatzen (hau hemen buruzko informazio gehiago: http://msdn.microsoft.com/en-us/library/58wxa9w5(VS.80).aspx) beraz, zer, Sortu IIS gune berri bat dut (portuan 8080) SharePoint berean identitate batera.. eta veiled.
    Hope honetan laguntzen

    Erantzun
  3. Zac BOYLES
    Badago aukera ona SQL en securityadmin zerbitzari rola konpon alea zen ran behin zinen izatea. Duten etengabeko lan azalpen ona izango litzateke.
    Erantzun
  4. Faery

    Nice writeup. We are having exactly the same issue right now. This kind of problem and unexpected/unexplained behaviour is exactly why a lot of developers cannot stand working with SharePoint!

    Erantzun
  5. Markus

    This part of the article….”gave the app pool identity account full access to SQL”, can you elaborate? “app pool identity” i presume means the app pool of the sharepoint site, baina “full access to SQL”, how do you give that? Creating a login on the db server for the app pool identity i think isn’t quite enough…so is it on the sharepoint content db where the new login gets dbo (?) access? Or other sharepoint db’s as well, like the config db? For me that’s tough, because my sp content db apparently isn’t handled by sql server instance, apparently it’s under “/Microsoft Office Servers/14.0/Data”, anyway i don’t see it in sql server mgr….any ideas how i give “full access to SQL” kasu honetan? Any reply would be appreciated…i’m kind stuck getting my console app to create an spsite object!!

    Erantzun

Utzi iruzkin bat Benjamin Utzi erantzuna

Zure e-posta helbidea ez da argitaratuko. Beharrezko eremuak markatu dira *