Réiteach: System.IO.FileNotFoundException ar “SPSite = nua SPSite(moladh)”

Suas chun dáta: Phost mé an cheist seo go MSDN anseo (http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=2808543&SiteID=1&mode=1) and Michael Washam of Microsoft responded with a concise answer.

Chruthaigh mé ar an ngréasán chun gníomhú mar Facade BDC-chairdiúil to a SharePoint list. When I used this from my development environment, d'oibrigh sé fíneáil. Nuair a migrated mé seo chuig freastalaí nua, Bhain mé an earráid seo:

System.IO.FileNotFoundException: An t-iarratas Gréasáin ag http://localhost/sandbox nach bhféadfaí a aimsiú. Fíoraigh go bhfuil tú clóscríofa i gceart an URL. Má ba chóir an URL a bheith ag freastal ar ábhar atá ann cheana, féadfaidh an riarthóir córas gá le mapála nua URL iarraidh a chur leis an iarratas beartaithe. ag Microsoft.SharePoint.SPSite .. ctor(SPFarm feirme, Uri requestUri, Boole contextSite, SPUserToken userToken) ag Microsoft.SharePoint.SPSite .. ctor(Teaghrán requestUrl) ag Conchango.xyzzy.GetExistingDocument(Teaghrán minId, Teaghrán maxId, Teaghrán teideal scagaire) i C:\Doiciméid agus Settings Paul Mo Doiciméid Visual Studio 2005 Tionscadail xyzzy BDC_DocReview BDC_DocReview DocReviewFacade.asmx.cs:líne 69

Anseo tá líne 69:

ag baint úsáide as (Láithreán SPSite = nua SPSite("http://localhost/sandbox"))

Bhain mé triail as athruithe éagsúla ar an URL, lena n-áirítear úsáid a bhaint as an fhreastalaí ainm fíor, a seoladh IP, slaiseanna trailing ar an URL, etc. I always got that error.

Bhain mé úsáid An Google to research it. Lots of people face this issue, nó malartú uirthi, ach an chuma aon duine a bhfuil réiteach air.

Tricksy MOSS ar fáil den sórt sin earráid mionsonraithe nach raibh sé tarlú go dom a sheiceáil leis an 12 hive logs. Faoi dheireadh, faoi 24 uair an chloig tar éis mo chomhghleacaí Mhol féidir liom mar sin, Sheiceáil mé amach an 12 logáil hive agus fuair sé seo:

Eisceacht Tharla agus ag iarraidh a fháil ar an bhfeirm áitiúil:
System.Security.SecurityException: Nach dtugtar rochtain clárlann Iarrtha cheadaítear.
ag System.ThrowHelper.ThrowSecurityException(ExceptionResource acmhainn) ag
(Ainm Teaghrán, Inscríofa Boole) ag
(Ainm Teaghrán) ag
() ag
() ag
(SPFarm& feirme, Boole& isJoined)
Ba é an Crios an tionól gur theip:  MyComputer

D'oscail sé seo suas bealaí nua taighde, mar sin bhí sé ar ais go dtí an Google. A thug mé chun an fóram phost: 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 ar 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. Mar sin féin, Chuaigh mo chomhghleacaí agus thug an app linn snámha aitheantais cuntas rochtain iomlán a bheith SQL.

Chomh luath agus a rinne sí go bhfuil athrú, everything started working.

Cad a tharla ansin is fearr a shloinneadh mar haiku dán:

Fadhbanna a ardú a lámha.
You swing and miss. Try again.
Rath! But how? Cén fáth ar?

Ní raibh sí ag iarraidh chun rudaí a fhágáil ina n-aonar mar sin, preferring a thabhairt ar an cead íosta is gá (agus is dócha le súil a scríobh ar iontráil bhlag; Buille mé léi chun an Punch, muhahahahaha!).

Bhain sí ceadanna a chéile ón gcuntas aitheantais linn snámha app go dtí … 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.

Mar sin,, a recap: we gave the app pool identity full access and then took it away. The web service started working and never stopped working. Bizarre.

Má tá aithne ag duine ar bith cén fáth ar chóir a bheith ag obair, fág tagairt le do thoil.

</deireadh>

Clibeanna Technorati:

11 smaointe ar "Réiteach: System.IO.FileNotFoundException ar “SPSite = nua SPSite(moladh)”

  1. Fernando Gómez Flores

    Nice bpost, go raibh maith agat. I mo chás, Cuireadh réiteach mo fhadhb ag athrú apppool an webservice a mheaitseáil go bhfuil an bailiúchán láithreán SharePoint.

    Cheers,
    Fernando A. Gómez F.

    Freagra
  2. Prakash Vedachalam

    I have a thriail le haghaidh 4 uair an chloig. ar deireadh cuidíonn sé liom.. Thanks a lot Jeffrey Knight

    Freagra
  3. Wilson Edgar

    Hi, Bhí mé chomh maith an fhadhb chéanna. Cé a fhorbairt ar an meaisín céanna le SharePoint Server, Bhí mé ag baint úsáide as Freastalaí Forbartha Asp le cead difriúla ní nach bhfuil cinnte ag rith faoi chéannacht céanna SharePoint (níos mó faoi seo anseo: http://msdn.microsoft.com/en-us/library/58wxa9w5(VS.80).ASPX) mar sin cad, Tá mé ar shuíomh nua i IIS chruthú (port 8080) leis an aitheantas céanna SharePoint.. agus veiled.
    Tá súil Cuidíonn seo

    Freagra
  4. Zac BOYLES
    Tá seans maith go seasta ról freastalaí SQL securityadmin ar an tsaincheist raibh tú ag aon uair amháin a bhí ar siúl sé. Bheadh ​​sé sin a bheith ina míniú maith le leanúint ar aghaidh chun bheith ag obair.
    Freagra
  5. 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!

    Freagra
  6. 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, ach “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” sa chás seo? Any reply would be appreciated…i’m kind stuck getting my console app to create an spsite object!!

    Freagra

Leave a Reply

Ní thabharfar do sheoladh r-phoist a fhoilsiú. Réimsí riachtanacha atá marcáilte *