none
Trying to get WebSharingAppDemo to load and work RRS feed

  • Question

  • Hi,

    I am relatively new to programming and have rather been thrown in the deep end. I have come across several things.

    Firstly, when I load the WebSharingAppDemo in either Visual C# or Visual WebDeveloper (both are 2008 Express editions), things seem to load okay except for the WebSyncContract project. I receive a message pop-up saying that the projec type is not supported. I can't seem to find out why this would be.

    Secondly, as I really have no idea about C#, is there a version of this app available in Visual Basic? I've converted as much as I am able, but not knowing the original language, some things look as though they should work, but obviously don't.

    Thirdly, (sorry, this is getting to be a lot to ask), when I look at the WebSyncContract.csproj, there seems to be an error

    <

     

    ItemGroup>

    <

     

    WCFMetadata Include="Service References\" />

    </

     

    ItemGroup>

    I've looked everywhere I can think of, but can't seem to find a solution to this error. The error reads "The element "ItemGroup" in namespace http://schemas.microsoft.com/developer/msbuild/2003 has an invalid Child element in 'WCFMetaData' in namespace".

    Any assistance would be greatly appreciated.

     

    Friday, July 9, 2010 1:06 PM

All replies

  • looks like you dont have the WCF project template installed.
    Sunday, July 18, 2010 3:04 PM
    Moderator
  • I agree with JuneT, you seem to be missing the WCF project template.

    The WebSharingAppDemo sample is only available in C#. We do not have the implementation in Visual Basic.

    The error you mention in the csproj is due to the missing WCF project template.

    • Proposed as answer by Ganeshan Tuesday, July 20, 2010 10:15 PM
    • Unproposed as answer by mrsironose Wednesday, August 25, 2010 12:55 PM
    Tuesday, July 20, 2010 10:05 PM
  • Thanks for the information. Now for the next REALLY stupid question...

    Where do I get the WCF Project Templates?

     

    Thanks again!

    Sunday, July 25, 2010 2:22 PM
  • Okay, so I have finally got the WebSharingAppDemo-SqlProviderEndToEnd to compile and mostly work.

    The problem now is that when I try to open the program, I get a Named Pipes Provider error 40 error message (Can't open a connection to the server).

    I tried to do a named instance of my SQLEXPRESS (2008) server, but when re-compiling, it complains about the "\" in the server name (CAROL-PC\SQLEXPRESS).  I tried (as suggested somewhere) that I use CAROL-PC/SQLEXPRESS, but then the program can't find the server.

    At a loss.....again!!!!

    Thursday, July 29, 2010 2:24 PM
  • would you mind posting the connection string and the error you get when using CAROL-PC\SQLEXPRESS?
    Thursday, July 29, 2010 2:30 PM
    Moderator
  • I've discovered the answer the problem with CAROL-PC\SQLEXPRESS. The compiler did not like the "\", so I have changed the string to @"CAROL-PC\SQLEXPRESS". The app builds and publishes just fine now.

    HOWEVER, when I run it and try to synchronise peer1 and peer2, I am now getting "Remote server returned an unexpected response (405): Method not allowed".

    I've checked the IIS server, and it seems to allow everything it's meant to.

    Floundering again.....

    Monday, August 2, 2010 12:36 PM
  • I am having a similar problem with deploying my WCF WebSyncContract service to IIS. It appears to be either a problem in my web.config or IIS settings. I have tried many many different things with no luck, any help would be greatly appreciated. I can provide trace logs if it would be helpful.

     

    Using Fiddler, I have found that "Remote server returned an unexpected response (405): Method not allowed" is referring to the POST method.

    <fieldset><legend>Most likely causes:</legend>
    • The request sent to the Web server used an HTTP verb that is not allowed by the module configured to handle the request.
    • A request was sent to the server that contained an invalid HTTP verb.
    • The request is for static content and contains an HTTP verb other than GET or HEAD.
    • A request was sent to a virtual directory using the HTTP verb POST and the default document is a static file that does not support HTTP verbs other than GET or HEAD.
    </fieldset>
    <fieldset><legend>Things you can try:</legend>
    • Verify the list of verbs enabled for the module handler this request was sent to, and ensure that this verb should be allowed for the Web site.
    • Check the IIS log file to see which verb is not allowed for the request.
    • Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.
    </fieldset>

     

    <?xml version="1.0"?>
    <configuration>
    	<system.web>
    		<compilation debug="true"/>
    		<httpRuntime maxRequestLength="65536"/>
    	</system.web>
    	<!-- When deploying the service library project, the content of the config file must be added to the host's 
      app.config file. System.Configuration does not support config files for libraries. -->
    	<system.serviceModel>
    		<client>
       <endpoint address="http://localhost/RelationalSyncContract/"
        binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ISqlSyncContract"
        contract="ServiceReference1.ISqlSyncContract" name="WSHttpBinding_ISqlSyncContract">
        <identity>
         <dns value="localhost" />
        </identity>
       </endpoint>
      </client>
      <services>
    			<service behaviorConfiguration="WebSyncContract.SyncServiceBehavior" name="WebSyncContract.SqlWebSyncService">
    				<endpoint address="" binding="wsHttpBinding" bindingConfiguration="largeMessageHttpBinding" contract="WebSyncContract.ISqlSyncContract">
    					<identity>
    						<dns value="localhost"/>
    					</identity>
    				</endpoint>
    				<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
    				<host>
    					<baseAddresses>
    						<add baseAddress="http://localhost/RelationalSyncContract/"/>
    					</baseAddresses>
    				</host>
    			</service>
    		</services>
    		<bindings>
       <wsHttpBinding>
        <binding name="largeMessageHttpBinding" maxReceivedMessageSize="10485760">
         <readerQuotas maxArrayLength="10485760" />
        </binding>
        <binding name="WSHttpBinding_ISqlSyncContract" closeTimeout="00:01:00"
         openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
         bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
         maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
         textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
         <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
          maxBytesPerRead="4096" maxNameTableCharCount="16384" />
         <reliableSession ordered="true" inactivityTimeout="00:10:00"
          enabled="false" />
         <security mode="Message">
          <transport clientCredentialType="Windows" proxyCredentialType="None"
           realm="" />
          <message clientCredentialType="Windows" negotiateServiceCredential="true"
           algorithmSuite="Default" />
         </security>
        </binding>
       </wsHttpBinding>
      </bindings>
    		<behaviors>
    			<serviceBehaviors>
    				<behavior name="WebSyncContract.SyncServiceBehavior">
    					<!-- To avoid disclosing metadata information, 
              set the value below to false and remove the metadata endpoint above before deployment -->
    					<serviceMetadata httpGetEnabled="True"/>
    					<!-- To receive exception details in faults for debugging purposes, 
              set the value below to true.  Set to false before deployment 
              to avoid disclosing exception information -->
    					<serviceDebug includeExceptionDetailInFaults="True"/>
    				</behavior>
    			</serviceBehaviors>
    		</behaviors>
    	</system.serviceModel>
    	<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>


    Wednesday, February 1, 2012 4:36 PM
  • can you check if you have WCF/IIS configured correctly?

     Refer to http://msdn.microsoft.com/en-us/library/aa751792.aspx section "Ensure That IIS and WCF Are Correctly Installed and Registered"

    Wednesday, February 1, 2012 10:08 PM
    Moderator