<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Offro 20? a sistemista IIS7 per installare applicativo web da me realizzato]]></title><description><![CDATA[<p dir="auto"><strong>Applicazione web su IIS7.5 in errore scrittura file XML</strong></p>
<p dir="auto">L'applicativo l'ho già installato correttamente su deversi host, e ha sempre funzionato, ora sono passato ad un server dedicato dove ho riscontrato l'errore che qui spiegherò.</p>
<p dir="auto">Uso IIS 7.5 (in inglese)</p>
<p dir="auto">L'applicativo è settato per girare con la securuty policy FULL TRUST</p>
<p dir="auto">La mia applicazione web mi va in errore quando tenta di scrivere un file XML nella directory App_Data, chiedo istruzioni su come configurare correttamente IIS 7.5 per far girare il mio applicativo.</p>
<p dir="auto">L'errore che mi appare a video è il seguente:<br />
<strong>Description:</strong> An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.</p>
<p dir="auto"><strong>Exception Details:</strong> System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\App_Data\forum\1\9143\topic.xml' is denied.</p>
<p dir="auto"><a href="http://ASP.NET" rel="nofollow ugc">ASP.NET</a> is not authorized to access the requested resource. Consider granting access rights to the resource to the <a href="http://ASP.NET" rel="nofollow ugc">ASP.NET</a> request identity. <a href="http://ASP.NET" rel="nofollow ugc">ASP.NET</a> has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via &lt;identity impersonate="true"/&gt;, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.</p>
<p dir="auto">To grant <a href="http://ASP.NET" rel="nofollow ugc">ASP.NET</a> access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the <a href="http://ASP.NET" rel="nofollow ugc">ASP.NET</a> account, and check the boxes for the desired access.</p>
<p dir="auto"><strong>Source Error:</strong></p>
<p dir="auto">The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:</p>
<ol>
<li>Add a "Debug=true" directive at the top of the file that generated the error. Example:</li>
</ol>
<p dir="auto">&lt;%@ Page Language="C#" Debug="true" %&gt;</p>
<p dir="auto">or:</p>
<ol start="2">
<li>Add the following section to the configuration file of your application:</li>
</ol>
<p dir="auto">&lt;configuration&gt;<br />
&lt;<a href="http://system.web" rel="nofollow ugc">system.web</a>&gt;<br />
&lt;compilation debug="true"/&gt;<br />
&lt;/system.web&gt;<br />
&lt;/configuration&gt;</p>
<p dir="auto">Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.</p>
<p dir="auto">Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.<br />
<strong>Stack Trace:</strong></p>
<p dir="auto">[UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\App_Data\forum\1\9143\topic.xml' is denied.] WebApplication.FileManager.Serialize(Object Obj, String NameFile) +872 WebApplication.Topic.SaveInfo() +129 WebApplication.Topic.IncReaded() +27 WebApplication.ForumManager.ShowTopic(SubSite Setting, Int32 ForumID, Int32 TopicID, Int32 CurrentPage, Boolean ShowCensored, Boolean ShowAvatars, Boolean OperationsColumn, Page Page, ActionType Action, String Jump, Control Buttons, Control LinksCorrelated, Boolean AddTitle, Boolean SetMetaRevisitAfter) +1058 WebApplication.Migrated_forum.SetVisualization() +3451 System.Web.UI.Control.PreRenderRecursiveInternal() +113 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4185</p>
<p dir="auto"><strong>Version Information:</strong> Microsoft .NET Framework Version:4.0.30319; <a href="http://ASP.NET" rel="nofollow ugc">ASP.NET</a> Version:4.0.30319.1</p>
<p dir="auto"><strong>Server Error in '/' Application.</strong></p>
<p dir="auto"><em><strong>Access to the path 'C:\inetpub\wwwroot\App_Data\forum\1\9143\topic.xml' is denied.</strong></em></p>
]]></description><link>https://dev.connect.gt/topic/149509/offro-20-a-sistemista-iis7-per-installare-applicativo-web-da-me-realizzato</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 05:05:34 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/149509.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 Apr 2011 09:48:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Offro 20? a sistemista IIS7 per installare applicativo web da me realizzato on Thu, 14 Apr 2011 21:14:54 GMT]]></title><description><![CDATA[<p dir="auto">Meglio così allora <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=12b9555a9a1" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":-)" alt="🙂" /></p>
<p dir="auto">Fai attenzione però, far girare le applicazioni come Administrator non è il massimo ... Da quello che dici credo che a maggior ragione si tratti di un problema di permessi (essendo Administrator sicuramente autorizzato a scrivere in quella cartella)</p>
]]></description><link>https://dev.connect.gt/post/989722</link><guid isPermaLink="true">https://dev.connect.gt/post/989722</guid><dc:creator><![CDATA[marshall 0]]></dc:creator><pubDate>Thu, 14 Apr 2011 21:14:54 GMT</pubDate></item><item><title><![CDATA[Reply to Offro 20? a sistemista IIS7 per installare applicativo web da me realizzato on Thu, 14 Apr 2011 20:48:03 GMT]]></title><description><![CDATA[<p dir="auto">Il problema l'ho risolto impostando l'Administrator come utente che impersonalizza il pool dell'applicazione.</p>
<p dir="auto">La cosa strana, è che sempre sotto App_Data scrivevo dei file di log con estenzione .txt e non ho riscontrato restrizioni nello scrivere in questi file, mentre invece l'impedimento in scrittura era solo nello scrivere file con estenzione .xml</p>
]]></description><link>https://dev.connect.gt/post/989718</link><guid isPermaLink="true">https://dev.connect.gt/post/989718</guid><dc:creator><![CDATA[p.1086.wer]]></dc:creator><pubDate>Thu, 14 Apr 2011 20:48:03 GMT</pubDate></item><item><title><![CDATA[Reply to Offro 20? a sistemista IIS7 per installare applicativo web da me realizzato on Thu, 14 Apr 2011 14:12:57 GMT]]></title><description><![CDATA[<p dir="auto">Sembrerebbe un problema di permessi sulla cartella C:\inetpub\wwwroot, che nulla ha a che fare con le policy di sicurezza impostate sull'applicazione.</p>
<p dir="auto">Hai provato ad accertarti che l'utente IIS abbia i permessi su quella cartella? In lettura penso che li troverai sicuramente abilitati, ma da quello che mi sembra di aver capito dallo stack trace, stai cercando di fare una scrittura (SaveInfo...) e di conseguenza devi concedere all'utente di IIS anche i permessi in scrittura.</p>
<p dir="auto">L'utente IIS dovrebbe essere IUSR (dovrebbe perchè se non ricordo male è cambiato con il rilascio di una versione di IIS). In ogni caso, puoi fare un veloce test "d'esclusione" provando a concedere <strong>TEMPORANEAMENTE</strong> i permessi completi all'utente Everyone e provare a far girare l'applicazione.</p>
<p dir="auto">Se gira senza eccezioni, allora hai trovato la causa del tuo problema.</p>
<p dir="auto">Ricordati in ogni caso di eliminare poi qualsiasi tipo di autorizzazione sull'utente Everyone.</p>
]]></description><link>https://dev.connect.gt/post/989721</link><guid isPermaLink="true">https://dev.connect.gt/post/989721</guid><dc:creator><![CDATA[marshall 0]]></dc:creator><pubDate>Thu, 14 Apr 2011 14:12:57 GMT</pubDate></item></channel></rss>