Soluzzjoni: System.IO.FileNotFoundException fuq “SPSite = ġdid SPSite(url)”

UPDATE: I stazzjonati din il-kwistjoni MSDN hawn (http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=2808543&SiteID=1&mode=1) and Michael Washam of Microsoft responded with a concise answer.

I ħolqot servizz web biex jaġixxi bħala Faċċata BDC-friendly to a SharePoint list. When I used this from my development environment, maħduma multa. Meta I emigraw din lil server ġdida, I jiltaqgħu dan l-iżball:

System.IO.FileNotFoundException: L-applikazzjoni Web fil http://localhost/sandbox ma jistax jinstab. Jivverifikaw li inti għandek ittajpjat-URL b'mod korrett. Jekk il-URL għandhom jservu kontenut eżistenti, l-amministratur tas-sistema jista 'jkollhom bżonn li żżid mapping ġdida URL talba għall-applikazzjoni intenzjonata. fil Microsoft.SharePoint.SPSite .. ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken) fil Microsoft.SharePoint.SPSite .. ctor(String requestUrl) fil Conchango.xyzzy.GetExistingDocument(String minId, String maxId, String filtru titolu) fis-C:\Dokumenti u Settings Dokumenti Tiegħi Pawl Visual Studio 2005 Proġetti xyzzy BDC_DocReview BDC_DocReview DocReviewFacade.asmx.cs:linja 69

Hawnhekk huwa linja 69:

użu (Sit SPSite = ġdid SPSite("http://localhost/sandbox"))

I ppruvaw varjazzjonijiet differenti fuq l-URL, inkluż l-użu reali isem tal-server, indirizz IP tiegħu, slashes tkaxkir fuq l-URL, eċċ. I always got that error.

I użati Il-Google to research it. Lots of people face this issue, jew varjazzjonijiet ta 'dan, imma ebda wieħed deher li huwa solvuti.

Tricksy MOSS sakemm tali żball dettaljata li dan ma sarx lili biex jiċċekkja l- 12 hive logs. Eventwalment, dwar 24 siegħa wara kollega tiegħi rakkomandat I jagħmlu dan, I ċċekkjati l- 12 log doqqajs u sabet dan:

Eċċezzjoni ġara waqt li jipprova li jiksbu l-irziezet lokali:
System.Security.SecurityException: Aċċess reġistru Mitlub ma jkunx permess.
fil System.ThrowHelper.ThrowSecurityException(ExceptionResource riżorsi) fi
(Isem String, Writable Boolean) fi
(Isem String) fi
() fi
() fi
(SPFarm& farm, Boolean& isJoined)
Il-Żona ta 'l-assemblea li naqas kien:  MyComputer

Dan fetħet toroq ġodda ta 'riċerka, allura kien lura lill-Google. Li wasslitni sabiex dan forum post: http://forums.codecharge.com / posts.php?post_id = 67,135. 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 tal 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. Madankollu, kollega tiegħi marru u taw l-app pool identità kont aċċess sħiħ għall SQL.

Hekk kif hi magħmula li l-bidla, everything started working.

Dak li ġara jmiss huwa l-aħjar espressa bħala haiku poeżija:

Problemi jgħollu idejhom.
You swing and miss. Try again.
Success! But how? Għaliex?

Hi ma riditx li jħallu l-affarijiet waħdu bħal dik, pprefera li tagħti l-permess minimu meħtieġ (u probabbilment b'attenzjoni għall-kitba ta 'dħul blog; I taħbit tagħha lill-punch, muhahahahaha!).

Hija ħassret permessi suċċessivi mill-pool kont identità app sakemm … 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.

Allura, biex terġa: we gave the app pool identity full access and then took it away. The web service started working and never stopped working. Bizarre.

Jekk xi ħadd jaf għaliex li għandhom ħadmu, jekk jogħġbok leave kumment.

</aħħar>

11 ħsibijiet dwar "Soluzzjoni: System.IO.FileNotFoundException fuq “SPSite = ġdid SPSite(url)”

  1. Fernando Gómez Flores

    Nizza post, grazzi. Fil-każ tiegħi, problema tiegħi kienet solvuta billi tbiddel apppool tal-webservice li jaqbel ma 'dak tal-ġbir sit SharePoint.

    Cheers,
    Fernando. Gómez F.

  2. Wilson Edgar

    Hi, I wkoll kellhom l-istess problema. Filwaqt li l-iżvilupp fuq l-istess magna ma Sharepoint server, I kienet qed tuża Asp Iżvilupp Server bil-permess differenti ċertament ma tkunx qed taħdem taħt l-istess identità bħala Sharepoint (aktar dwar dan hawn: http://msdn.microsoft.com/en-us/library/58wxa9w5(VS.80).aspx) iva, liema, Stajt jinħoloq sit ġdid fil IIS (port 8080) bl-istess identità bħala SharePoint.. jew mgħotti.
    Nittama li dan jgħin

  3. Zac Boyles
    Hemm ċans tajjeb li r-rwol SQL server tal securityadmin ffissat il-kwistjoni inti wara li kienu darba kien dam. Dan ikun spjegazzjoni tajba għal dan jkomplu jaħdmu.
  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!

  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, iżda “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” f'dan il-każ? Any reply would be appreciated…i’m kind stuck getting my console app to create an spsite object!!

Ħalli Irrispondi

Your email address mhux se jkun ippubblikat. Meħtieġa oqsma huma mmarkati *