none
Config file in sharepoint RRS feed

  • Question

  • Hello All

    I was working on a asp.net application but I need to replicate that asp.net application to sharepoint. I have created all the web parts to mimic the front end and alll the dlls are deployed to GAC. The problem I am facing is with config file. I am using Microsoft.Austria.WcfHelpers.SoapAttachment.dll in my application for sending MIME type attachment to web service. There is one configuration related to this which I have to add so the file can be send as a MIME type. The configuration is  shown below

    <customBinding>
    
        <binding name="SwaBindingConfiguration">
    
         <swaMessageEncoding innerMessageEncoding="textMessageEncoding"/>
    
         <httpTransport maxReceivedMessageSize="62914560" authenticationScheme="Basic" maxBufferSize="62914560" proxyAuthenticationScheme="Basic" useDefaultWebProxy="true">
    
          <extendedProtectionPolicy policyEnforcement="Never"/>
    
         </httpTransport>
    
        </binding>
    
    </customBinding>
    

    Once i added this config lines inside system.servicemodel, the PSI services related to Project Server stopped working properly. Can anyone suggest any solution on this?

    It would be better if someone can tell me how i can create a separate config file for my application and include it in SharePoint site

     

    • Moved by Mike Walsh FIN Wednesday, March 16, 2011 6:45 AM Project Server (From:SharePoint - Development and Programming (pre-SharePoint 2010))
    • Moved by Alexander.BurtonModerator Wednesday, March 16, 2011 10:03 AM Sorry to do it again, but moving to the Project customisation & programming forum where there is a better chance of it being answered. (From:Project Server - Setup, Upgrade, Administration and Operation)
    Wednesday, March 16, 2011 6:20 AM

Answers

  • I finally solved the issue. There is a trustLevel tag in web.config file. All I needed to do was set that as "Full". Although this may lead to security problem so other option will be create a new CAS and then refer that as new secuirty policy or i can get a strong named dll for Microsoft.Austria.WcfHelpers.SoapAttachment.dll and then deploy it in GAC.

    Using any of three will solve the problem

    • Marked as answer by cybertechsum Monday, April 18, 2011 5:36 AM
    Monday, April 18, 2011 5:36 AM

All replies

  • Your asp.net app could have a web.config file its own subdirectory. For example, the Content View in IIS Manager shows the top-level SharePoint site that hosts the PWA application has a web.config file, and the PSI subdirectory also has a web.config file.

    In addition to the <binding name="SwaBindingConfiguration">, the PSI needs its own <basicHttpBinding>, as in the code below. However, I'm not familiar with Microsoft.Austria.WcfHelpers.SoapAttachment.dll.

    <bindings>
     <basicHttpBinding>
      <binding name="basicHttpConf" sendTimeout="01:00:00" maxBufferSize="500000000"
       maxReceivedMessageSize="500000000">
       <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
        maxBytesPerRead="4096" maxNameTableCharCount="500000000" />
       <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Ntlm" realm="" />
       </security>
      </binding>
     </basicHttpBinding>
    </bindings>
    <client>
     <!-- Change the server name for your Project Server installation. -->
     <endpoint address="http://ServerName/pwa/_vti_bin/PSI/ProjectServer.svc"
      behaviorConfiguration="basicHttpBehavior" binding="basicHttpBinding"
      bindingConfiguration="basicHttpConf" contract="SvcProject.Project"
      name="basicHttp_Project" />
    </client>
    
    

    Jim Corbin [MSFT]
    Wednesday, March 16, 2011 2:38 PM
  • Hello Jim

    Thanks for the reply. I am not sure where to place my web.config file as I am creating sharepoint web parts for each web page of my application and then adding those web parts in the web part page created in the PWA site. There is no subdirectory created in the sharepoint folder as created for PSI

    Thursday, March 17, 2011 4:39 AM
  • You can configure the PSI endpoints programmatically, in your Web Part, rather than putting the endpoints in the web.config file. For an example, see the SetClientEndpoints method (Procedure 3, step 6) in the Walkthrough: Customizing the PWA Ribbon and Accessing the JS Grid article. The article is not about a Web Part, but the SetClientEndpoints method can work in a lot of situations.

    Again, I'm not familiar with Microsoft.Austria.WcfHelpers.SoapAttachment.dll, so don't know what effect that may have.


    Jim Corbin [MSFT]
    Friday, March 18, 2011 7:57 PM
  • I finally solved the issue. There is a trustLevel tag in web.config file. All I needed to do was set that as "Full". Although this may lead to security problem so other option will be create a new CAS and then refer that as new secuirty policy or i can get a strong named dll for Microsoft.Austria.WcfHelpers.SoapAttachment.dll and then deploy it in GAC.

    Using any of three will solve the problem

    • Marked as answer by cybertechsum Monday, April 18, 2011 5:36 AM
    Monday, April 18, 2011 5:36 AM