Ufumbuzi: System.IO.FileNotFoundException juu ya “SPSite = mpya SPSite(url)”

UPDATE: I posted swali hili kwa MSDN hapa (http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=2808543&SiteID=1&mode=1) and Michael Washam of Microsoft responded with a concise answer.

Mimi umba huduma ya mtandao wa kutenda kama BDC-kirafiki facade to a SharePoint list. When I used this from my development environment, ni kazi nzuri. Wakati mimi alihamia hii server mpya, Mimi wamekutana kosa hili:

System.IO.FileNotFoundException: Maombi ya Mtandao katika http://localhost/sandbox hakuweza kupatikana. Kuthibitisha kwamba una typed URL usahihi. Kama URL lazima kuwahudumia bidhaa zilizopo, msimamizi wa mfumo inaweza haja ya kuongeza mpya ombi URL ramani na maombi ya lengo. saa Microsoft.SharePoint.SPSite .. ctor(SPFarm kilimo, Uri requestUri, Boolean contextSite, SPUserToken userToken) saa Microsoft.SharePoint.SPSite .. ctor(Kamba requestUrl) saa Conchango.xyzzy.GetExistingDocument(Kamba minId, Kamba maxId, Kamba cheo filter) katika C:\Nyaraka na Settings Paulo My Documents Visual Studio 2005 Miradi xyzzy BDC_DocReview BDC_DocReview DocReviewFacade.asmx.cs:mstari 69

Hapa ni mstari 69:

kutumia (SPSite tovuti = mpya SPSite("http://localhost/sandbox"))

Nilijaribu tofauti tofauti juu ya URL, ikiwa ni pamoja na kutumia seva jina halisi, anwani yake ya IP, trailing mikwaju juu ya URL, nk. I always got that error.

Nilikuwa Google to research it. Lots of people face this issue, au tofauti yake, lakini hakuna mtu walionekana kuwa ni kutatuliwa.

Tricksy MOSS zinazotolewa kosa vile kina kwamba hakuwa kutokea kwangu kuangalia 12 hive logs. Hatimaye, kuhusu 24 baada ya masaa yangu mwenzake ilipendekeza mimi kufanya hivyo, I checked nje 12 mzinga logi na kupatikana hii:

ubaguzi ilitokea wakati wa kujaribu kupata shamba la mtaa:
System.Security.SecurityException: Tafsiri upatikanaji Msajili haruhusiwi.
saa System.ThrowHelper.ThrowSecurityException(ExceptionResource rasilimali) katika
(Kamba jina, Boolean writable) katika
(Kamba jina) katika
() katika
() katika
(SPFarm& kilimo, Boolean& isJoined)
Kanda ya mkutano kwamba wameshindwa mara:  MyComputer

Hii kufunguliwa fursa mpya ya utafiti, hivyo ilikuwa nyuma ya Google. Kwamba aliniongoza hii jukwaa baada ya: 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 ya 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. Hata hivyo, mwenzangu akaenda akawapa pool programu utambulisho akaunti kamili upatikanaji wa SQL.

Haraka kama yeye alifanya kwamba mabadiliko, everything started working.

Kilichotokea ijayo ni bora walionyesha kama haiku shairi:

Matatizo ya kuinua mikono yao.
You swing and miss. Try again.
Mafanikio! But how? Kwa nini?

Yeye hakutaka kuacha mambo peke yake kama kwamba, wakipendelea kutoa kima cha chini cha required ruhusa (na pengine kwa jicho kwa kuandika kuingia blog; Mimi kuwapiga wake Punch, muhahahahaha!).

Yeye kuondolewa ruhusa mfululizo kutoka akaunti ya programu pool utambulisho mpaka … 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.

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

Kama mtu anajua kwa nini kwamba wanapaswa kuwa na kazi, tafadhali acha maoni.

</mwisho>

Tags technorati:

11 mawazo juu ya "Ufumbuzi: System.IO.FileNotFoundException juu ya “SPSite = mpya SPSite(url)”

  1. Fernando Gómez Flores

    Nzuri baada ya, shukrani. Katika kesi yangu, tatizo langu ilikuwa kutatuliwa kwa kubadilisha apppool webservice kwa mechi hiyo ya ukusanyaji tovuti SharePoint.

    Cheers,
    Fernando. Gómez F.

    Kujibu
  2. Wilson Edgar

    Hi, Mimi pia alikuwa na tatizo moja. Wakati zinazoendelea kwenye mashine hiyo kwa SharePoint server, Nilikuwa kutumia ASP Maendeleo Server kwa ruhusa tofauti si hakika si mbio chini ya utambulisho huo kama SharePoint (zaidi kuhusu hili hapa: http://msdn.microsoft.com/en-us/library/58wxa9w5(VS.80).aspx) hivyo kile, Nimekuwa kuunda tovuti mpya katika IIS (bandari 8080) na utambulisho huo kama SharePoint.. na kali.
    Matumaini hii husaidia

    Kujibu
  3. Zac Boyles
    Kuna nafasi nzuri kwamba securityadmin SQL ya server jukumu fasta suala wewe walikuwa kuwa mara moja ilikuwa ni mbio. Hiyo itakuwa maelezo mazuri kwa ajili yake kuendelea kufanya kazi.
    Kujibu
  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!

    Kujibu
  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, lakini “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” katika kesi hii? Any reply would be appreciated…i’m kind stuck getting my console app to create an spsite object!!

    Kujibu

Kuondoka Reply

Anwani yako si kuchapishwa. Mashamba required ni alama *