Answered by:
Update DotNetOpenAuth cause web.config compilation error

Question
-
User1292358045 posted
I create an MVC 4 Application from template, in VS2012 Express.
I update DotNetOpenAuth through nuget management console by command
Install-Package DotNetOpenAuth.Core
After its done, I noticed that web.config has those code appended
<dotNetOpenAuth><!-- This is an optional configuration section where aspects of dotnetopenauth can be customized. --><!-- For a complete set of configuration options see http://www.dotnetopenauth.net/developers/code-snippets/configuration-options/ --><openid><relyingParty><security requireSsl="false"><!-- Uncomment the trustedProviders tag if your relying party should only accept positive assertions from a closed set of OpenID Providers. --><!--<trustedProviders rejectAssertionsFromUntrustedProviders="true"> <add endpoint="https://www.google.com/accounts/o8/ud" /> </trustedProviders>--></security><behaviors><!-- The following OPTIONAL behavior allows RPs to use SREG only, but be compatible with OPs that use Attribute Exchange (in various formats). --><add type="DotNetOpenAuth.OpenId.RelyingParty.Behaviors.AXFetchAsSregTransform, DotNetOpenAuth.OpenId.RelyingParty" /></behaviors></relyingParty></openid><messaging><untrustedWebRequest><whitelistHosts><!-- Uncomment to enable communication with localhost (should generally not activate in production!) --><!--<add name="localhost" />--></whitelistHosts></untrustedWebRequest></messaging><!-- Allow DotNetOpenAuth to publish usage statistics to library authors to improve the library. --><reporting enabled="true" /></dotNetOpenAuth><uri><!-- The uri section is necessary to turn on .NET 3.5 support for IDN (international domain names), which is necessary for OpenID urls with unicode characters in the domain/host name. It is also required to put the Uri class into RFC 3986 escaping mode, which OpenID and OAuth require. --><idn enabled="All" /><iriParsing enabled="true" /></uri><system.net><defaultProxy enabled="true" /><settings><!-- This setting causes .NET to check certificate revocation lists (CRL) before trusting HTTPS certificates. But this setting tends to not be allowed in shared hosting environments. --><!--<servicePointManager checkCertificateRevocationList="true"/>--></settings></system.net>
When I compile the application, I got 13 messages in web.config such as
Message 13 Could not find schema information for the attribute 'enabled'.
Message 5 Could not find schema information for the attribute 'requireSsl'.
...All of them are in newly add codes.
It matters not when running in VS test site, however, when I publish the test site to production site, I got errors.
Only after I remove those codes from web.config, it runs without problem.
I wonder is it safe to remove those code? If not, how can I fix those messages?
Wednesday, May 8, 2013 2:45 PM
Answers
-
User-166373564 posted
Hi Cheng Bao
I can hardly find the exact problem of your issue, I think you could follow the document mentioned above to remove it, and then re-install it again, and check whether it is helpful to fix it,
Moreover, perhaps more information about NuGet could give some tips during your troubleshoot,
# NuGet Frequently Asked Questions
http://docs.nuget.org/docs/start-here/nuget-faq
# Installing NuGet
http://docs.nuget.org/docs/start-here/installing-nuget
hope it helpful to troubleshoot,
With regards
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, May 15, 2013 10:22 PM
All replies
-
User-2113916464 posted
Hope this gets you on the right track!!
http://stackoverflow.com/questions/9302785/dotnetopenauth-4-not-reading-config-values
Wednesday, May 8, 2013 3:08 PM -
User1292358045 posted
My web.config has the section
<sectionGroup name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection, DotNetOpenAuth.Core"> <section name="oauth" type="DotNetOpenAuth.Configuration.OAuthElement, DotNetOpenAuth.OAuth" requirePermission="false" allowLocation="true" /> <section name="openid" type="DotNetOpenAuth.Configuration.OpenIdElement, DotNetOpenAuth.OpenId" requirePermission="false" allowLocation="true" /> <section name="messaging" type="DotNetOpenAuth.Configuration.MessagingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" /> <section name="reporting" type="DotNetOpenAuth.Configuration.ReportingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" /> </sectionGroup>
it still have message like
Message 5 Could not find schema information for the element 'dotNetOpenAuth'.
Wednesday, May 8, 2013 5:42 PM -
User-166373564 posted
Hi Cheng Bao
You should check the DotNetOpenAuth Core version first,
You could also follow the document to find, install, remove, and update NuGet packages using PowerShell commands. You can also work with packages using the Manage NuGet Packages dialog box.
Installing a Package
After you have found a package that you want to install, use the Install-Package command with the name of the package.
Removing a Package
From the Tools menu, select Library Package Manager and then click Package Manager Console to remove a package,
# Finding and Installing a NuGet Package Using the Package Manager Console
http://docs.nuget.org/docs/start-here/using-the-package-manager-console
hope it helps you,
With regards
Wednesday, May 15, 2013 2:07 AM -
User1292358045 posted
http://nuget.org/packages/DotNetOpenAuth.Core/
this is exact what I did, but it make web.config not working
Wednesday, May 15, 2013 11:52 AM -
User-166373564 posted
Hi Cheng Bao
I can hardly find the exact problem of your issue, I think you could follow the document mentioned above to remove it, and then re-install it again, and check whether it is helpful to fix it,
Moreover, perhaps more information about NuGet could give some tips during your troubleshoot,
# NuGet Frequently Asked Questions
http://docs.nuget.org/docs/start-here/nuget-faq
# Installing NuGet
http://docs.nuget.org/docs/start-here/installing-nuget
hope it helpful to troubleshoot,
With regards
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, May 15, 2013 10:22 PM