Avatar billede lyhr007 Nybegynder
14. juli 2002 - 18:35 Der er 2 kommentarer og
1 løsning

Problemer med "Walkthrough: Creating a Distributed Application"

Jeg for en fejl når jeg prøver at lave http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vbwlkCreatingDistributedWebApplicationWalkthrough.asp

Jeg har fulgt den til punkt og prikke, men for stadig en fejl, når jeg skal "Add Web Reference".

Min Web.config ser således ud:

  <?xml version="1.0" encoding="utf-8" ?>
- <configuration>
- <system.web>
  <identity impersonate="true" />
- <!--
  DYNAMIC DEBUG COMPILATION
          Set compilation debug="true" to enable ASPX debugging.  Otherwise, setting this value to
          false will improve runtime performance of this application.
          Set compilation debug="true" to insert debugging symbols (.pdb information)
          into the compiled page. Because this creates a larger file that executes
          more slowly, you should set this value to true only when debugging and to
          false at all other times. For more information, refer to the documentation about
          debugging ASP .NET files.
   

  -->
  <compilation defaultLanguage="c#" debug="true" />
- <!--
  CUSTOM ERROR MESSAGES
          Set customError mode values to control the display of user-friendly
          error messages to users instead of error details (including a stack trace):

          "On" Always display custom (friendly) messages 
          "Off" Always display detailed ASP.NET error information.
          "RemoteOnly" Display custom (friendly) messages only to users not running
          on the local Web server. This setting is recommended for security purposes, so
          that you do not display application detail information to remote clients.
   

  -->
  <customErrors mode="RemoteOnly" />
- <!--
  AUTHENTICATION
          This section sets the authentication policies of the application. Possible modes are "Windows", "Forms",
          "Passport" and "None"
   

  -->
  <authentication mode="Windows" />
- <!--
  APPLICATION-LEVEL TRACE LOGGING
          Application-level tracing enables trace log output for every page within an application.
          Set trace enabled="true" to enable application trace logging.  If pageOutput="true", the
          trace information will be displayed at the bottom of each page.  Otherwise, you can view the
          application trace log by browsing the "trace.axd" page from your web application
          root.
   

  -->
  <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
- <!--
  SESSION STATE SETTINGS
          By default ASP .NET uses cookies to identify which requests belong to a particular session.
          If cookies are not available, a session can be tracked by adding a session identifier to the URL.
          To disable cookies, set sessionState cookieless="true".
   

  -->
  <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="20" />
- <!--
  GLOBALIZATION
          This section sets the globalization settings of the application.
   

  -->
  <globalization requestEncoding="utf-8" responseEncoding="utf-8" />
  </system.web>
  </configuration>

Og min AuthorsWebService.vsdisco ser sådan ud:

<?xml version="1.0" encoding="utf-8" ?>
<dynamicDiscovery xmlns="urn:schemas-dynamicdiscovery:disco.2000-03-17">
<exclude path="_vti_cnf" />
<exclude path="_vti_pvt" />
<exclude path="_vti_log" />
<exclude path="_vti_script" />
<exclude path="_vti_txt" />
<exclude path="Web References" />
</dynamicDiscovery>


Når jeg "Add Web reference" for følgende url http://localhost/AuthorsWebService/AuthorsWebService.vsdisco for jeg følgende fejl.

Web Services

(none)
No Web References were found on this page.
Click for help on finding a Web Reference.


Errors

The document at the url http://localhost/AuthorsWebService/AuthorsWebService.vsdisco was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'WSDL Document' is 'There is an error in XML document (2, 2).'.
  - <dynamicDiscovery xmlns='urn:schemas-dynamicdiscovery:disco.2000-03-17'> was not expected.
- Report from 'DISCO Document' is 'Discovery document at the URL http://localhost/AuthorsWebService/AuthorsWebService.vsdisco could not be found.'.
  - The document format is not recognized.
- Report from 'XML Schema' is 'Expected Schema root. Make sure that the root element is <schema> and the namespace is 'http://www.w3.org/2001/XMLSchema' for an XSD schema or 'urn:schemas-microsoft-com:xml-data' for an XDR schema. An error occurred at (2, 2).'.


  <?xml version="1.0" encoding="utf-8" ?>
- <dynamicDiscovery xmlns="urn:schemas-dynamicdiscovery:disco.2000-03-17">
  <exclude path="_vti_cnf" />
  <exclude path="_vti_pvt" />
  <exclude path="_vti_log" />
  <exclude path="_vti_script" />
  <exclude path="_vti_txt" />
  <exclude path="Web References" />
  </dynamicDiscovery>

Hvor xmlns="urn:schemas-dynamicdiscovery:disco.2000-03-17" er med rødt.

Håber der er en haj der kan se hvor fejlen er :)
Avatar billede kedde65 Praktikant
14. juli 2002 - 19:44 #1
Så vidt jeg kan huske skal du ikke lave en reference til en VDisco fil men derimod til en asmx fil.

VH CK
Avatar billede lyhr007 Nybegynder
14. juli 2002 - 21:07 #2
Ja det læste jeg også noget om, men hvis jeg laver en reference til asmx for jeg en fil download dialog.

Desuden læste jeg noget om hvordan man burde kunne løse problemet her:

http://www.able-consulting.com/dotnet/xmlwebservices/xmlwebservices_faq.htm

Jeg har prøvet hvad der står men for stadig den samme fejl selvom jeg har ændret min machine.config fil.
Avatar billede lyhr007 Nybegynder
17. juli 2002 - 17:40 #3
Prøver med en re-install.
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester