Pb de connection strings dans un webservice distant

neo557 Messages postés 34 Date d'inscription mardi 13 janvier 2004 Statut Membre Dernière intervention 30 août 2006 - 29 mars 2006 à 15:53
neo557 Messages postés 34 Date d'inscription mardi 13 janvier 2004 Statut Membre Dernière intervention 30 août 2006 - 30 mars 2006 à 12:56
Désolé j'ai du recréer le post car j'avais copier/coller quelque chose de faux. Je récris mon problème :


216204<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><v:shape id=_x0000_s1026 style="MARGIN-TOP: -70.85pt; Z-INDEX: 1; LEFT: 0px; MARGIN-LEFT: -70.85pt; WIDTH: 45pt; POSITION: absolute; HEIGHT: 33.75pt; TEXT-ALIGN: left; mso-wrap-distance-left: 0; mso-wrap-distance-right: 0; mso-position-horizontal-relative: text; mso-position-vertical-relative: line" o:button="t" o:allowoverlap="f" HREF="/auteurdetail.aspx?ID=216204" alt="" type="#_x0000_t75"><v:imagedata o:title="216204" src="file:///C:\DOCUME~1\OME-AN~1\LOCALS~1\Temp\msohtml1\01\clip_image001.jpg"></v:imagedata><?xml:namespace prefix = w ns = "urn:schemas-microsoft-com:office:word" /><w:wrap type="square"></w:wrap></v:shape>/auteurdetail.aspx?ID=216204Bonjour,

J'ai un problème qui doit être bien évident mais je ne m'en sort pas.

J'ai un WebService qui tourne sur un poste, ce webservice possède des méthodes qui reçoivent des strings et retournent des résultats sous format string également. Dans ces méthodes, mon web service effectue des recherches dans une base de données se trouvant sur le même poste.

Si je lance mon service avec le débugger je n'ai aucun souci, je peux utiliser mes méthodes sans problèmes et accéder tant que je veux à la base de données. Internet Explorer se lance à l'adresse suivante : http://localhost:1515/DSLAnalog/Service.asmx

Maintenant j'ai copié le répertoire de mon web service dans le répertoire de IIS (C:\Inetpub\wwwroot), et je tente de le lancer sur le poste en passant par l'adresse
normale :
http://MonPoste/DSLAnalog/Service.asmx

J'ai également tenter en local à l'adresse suivante :
http://localhost/DSLAnalog/Service.asmx

Mais j'ai toujours le même message d'erreur :



Server Error in '/DSLAnalog' Application.



<HR align=center width="100%" color=silver noShade SIZE=1>


Configuration Error


Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized configuration section 'connectionStrings'

Source Error:


Line 51:</exceptionPolicies>

Line 52: </exceptionHandling>

Line 53: <connectionStrings>

Line 54:

Line 55: </connectionStrings>



Source File: C:\Inetpub\wwwroot\DSLAnalog\web.config Line: 53




<HR align =center width="100%" color=silver noShade SIZE=1>



Ma question est connaissez vous cette erreur et comment puis-je la résoudre ?
Je ne trouve pas normal que ça marche quand je lance le débugger et que ça ne marche pas quand j'essaie d'y accéder par son adresse, aurais-je un problème avec mon instance dans IIS ?

Merci d'avance chers amis

Nelson

5 réponses

neo557 Messages postés 34 Date d'inscription mardi 13 janvier 2004 Statut Membre Dernière intervention 30 août 2006 1
29 mars 2006 à 16:01
Je post également une partie de mon webconfig comme cela m'avait été demandé :


<configuration><?xml:namespace prefix o ns "urn:schemas-microsoft-com:office:office" />


<configSections>


<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/>


<section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/>


<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/>


</configSections>


<loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">


<listeners>


<add fileName="trace.log" header="----------------------------------------" footer="----------------------------------------" formatter="" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" name="FlatFile TraceListener"/>


</listeners>


<formatters>


<add template="Timestamp: {timestamp}&#xA;Message: {message}&#xA;Category: {category}&#xA;Priority: {priority}&#xA;EventId: {eventid}&#xA;Severity: {severity}&#xA;Title:{title}&#xA;Machine: {machine}&#xA;Application Domain: {appDomain}&#xA;Process Id: {processId}&#xA;Process Name: {processName}&#xA;Win32 Thread Id: {win32ThreadId}&#xA;Thread Name: {threadName}&#xA;Extended Properties: {dictionary({key} - {value}&#xA;)}" type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" name="Text Formatter"/>


</formatters>


<categorySources>


<add switchValue="All" name="General">


<listeners>


<add name="FlatFile TraceListener"/>


</listeners>


</add>


</categorySources>


<specialSources>


<allEvents switchValue="All" name="All Events"/>


<notProcessed switchValue="All" name="Unprocessed Category"/>


<errors switchValue="All" name="Logging Errors &amp; Warnings">


<listeners>


<!---->


</listeners>


</errors>


</specialSources>


</loggingConfiguration>


<exceptionHandling>


<exceptionPolicies>


<add name="WebImageViewer Policy">


<exceptionTypes>


<add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=******" postHandlingAction="NotifyRethrow" name="Exception">


<exceptionHandlers>


<add logCategory="General" eventId="100" severity="Error" title="Enterprise Library Exception Handling" formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" priority="0" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" name="Logging Handler"/>


</exceptionHandlers>


</add>


</exceptionTypes>


</add>


</exceptionPolicies>


</exceptionHandling>


<connectionStrings>


<add name="DSLAnalog" connectionString="Data Source=vtech\SQLEXPRESS;Initial Catalog=DSLAnalog;Integrated Security=True" providerName="System.Data.SqlClient" />


</connectionStrings>


<appSettings/>


<system.web>


<compilation debug="true">


<assemblies>


<add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=*****"/>


<add assembly="System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=*****"/>


<add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=*****"/>


<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=*****"/>


<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=******"/>


<add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=*****"/></assemblies></compilation>


<!--


The section enables configuration


of the security authentication mode used by


ASP.NET to identify an incoming user.


-->


<authentication mode="Windows"/>


<!--


The <customErrors> section enables configuration


of what to do if/when an unhandled error occurs


during the execution of a request. Specifically,


it enables developers to configure html error pages


to be displayed in place of a error stack trace.





<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">


<error statusCode="403" redirect="NoAccess.htm" />


<error statusCode="404" redirect="FileNotFound.htm" />


</customErrors>


-->


</system.web>


</configuration>




Vraiment désolé d'acoir été obligé de réediter le post.
0
gyzmo222 Messages postés 66 Date d'inscription lundi 27 juin 2005 Statut Membre Dernière intervention 2 juin 2006 1
30 mars 2006 à 01:09
Essaye de changer ton tag custom error à la fin

<customErrors mode="Off"></customErrors>

eu lieu de

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

<error statusCode="403" redirect="NoAccess.htm" />

<error statusCode="404" redirect="FileNotFound.htm" />

</customErrors>
0
neo557 Messages postés 34 Date d'inscription mardi 13 janvier 2004 Statut Membre Dernière intervention 30 août 2006 1
30 mars 2006 à 08:40
C'est fait, malheureusement ça ne change rien.

Nelson
0
neo557 Messages postés 34 Date d'inscription mardi 13 janvier 2004 Statut Membre Dernière intervention 30 août 2006 1
30 mars 2006 à 09:34
J'ai modifier quelque chose dans IIS. Je me suis aperçu dans les propriétés de mon web service que l'"ASP.NET Version" était la 1.1....J'ai changé pour la 2.0. Et l'erreur à changée.


Server Error in '/DSL Analog' Application. <?xml:namespace prefix o ns "urn:schemas-microsoft-com:office:office" />


Failed to access IIS metabase.


Description: 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.

Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see =267904 http://support.microsoft.com/?kbid=267904.

Source Error:


An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.




Stack Trace:



[HostingEnvironmentException: Failed to access IIS metabase.]

System.Web.Configuration.MetabaseServerConfig.MapPathCaching(String siteID, VirtualPath path) +3492170

System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath.MapPath(String siteID, VirtualPath vpath) +9

System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +163

System.Web.CachedPathData.GetConfigPathData(String configPath) +382

System.Web.CachedPathData.GetConfigPathData(String configPath) +243

System.Web.CachedPathData.GetApplicationPathData() +68

System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +3385679

System.Web.Configuration.RuntimeConfig.GetLKGRuntimeConfig

J'ai tenté la manipulation décrite sur le lien que renvoi ce message d'erreur. J'ai télécharger le "metaacl.exe" l'ai installé puis j'ai lancer la ligne de commande écrite sur le site, mais rien n'y fait l'erreur ne bouge pas...

Nelson
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
neo557 Messages postés 34 Date d'inscription mardi 13 janvier 2004 Statut Membre Dernière intervention 30 août 2006 1
30 mars 2006 à 12:56
Ok ben j'ai trouvé ce qui n'allait pas. C'est tout simplement mon installation de IIS qui n'était pas complète. Si ça arrive a qqun vérifier bien que vous avez tous les composants de IIS installés.

Nelson
0
Rejoignez-nous