SocialAuth.NET is not working [duplicate] - c#

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
unrecognized attribute ‘targetframework’
I'm trying to use SocialAuth.NET for extract contacts from gmail and yahoo for my web application but when I run the WebformDemo the following error occurs
Server Error in '/Demo' Application.
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 attribute 'targetFramework'. Note
that attribute names are case-sensitive.
Source Error:
Line 76: </authentication>-->
Line 77: <!--<authentication mode="None"/>-->
Line 78: <compilation debug="true" targetFramework="4.0">
Line 79: <assemblies>
Line 80: <add assembly="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Source File: D:\test\SocialAuth-net-2.3\WebFormsDemo\web.config
Line: 78
Version Information: Microsoft .NET Framework Version:2.0.50727.3053;
ASP.NET Version:2.0.50727.3053
I'm using Windows XP and Visual Studio 2010.
Any help?

sorry guys I realized my mistake.The problem is I didnt change the asp.net version in IIS..If any one suffer with the same problem go through the following steps
step 1. run-> inetmgr
step 2.create a virtual folder for your directory (http://code.google.com/p/socialauth-net/wiki/Quickstart_Guide)
step 3. right click on your virtual directory then click properties and select asp.net tab and change version to 4.0

Related

change web.config back to previous setting

I have split my App_Code folder into VB and CS folders, to accommodate the two class files at compile time. I added the following to the web.config file to make it work.
<compilation debug="true" strict="false" explicit="true" defaultLanguage="C#">
<codeSubDirectories>
<clear/>
<add directoryName="VBCode" />
<add directoryName="CSCode" />
</codeSubDirectories>
</compilation>
I now want to remove the two folders and go back to a single vb only... IF I delete the above code from the web.config file I get the following 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: The code subdirectory '/mysite/App_Code/VBCode/' does not exist.
Source Error:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Source File: E:\web\web.config Line: 75
This is on a hosted site and it appears I don't have access to the machine.config or ability to view it?
How can I go back to previous configuration?
EDIT:
I understand the use of <clear/> but I'm looking to delete the folders from the site... refference: https://msdn.microsoft.com/en-us/library/ms228265(VS.85).aspx

Strange (but need help)- Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive

I have built one website using the .net framework 4.5 . Here is the code snippet from the Web.config file.
<compilation debug="true" targetFramework="4.5"/>
I have hosted the same website in my local machine IIS7. While creating a new website, Application pool I selected as 4.0. When I try to access the same from the browser I am getting below error.
Server Error in '/' Application.
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 attribute 'targetFramework'. Note that attribute names are case-sensitive.
Source Error:
Line 14: -->
Line 15: <system.web>
Line 16: <compilation targetFramework="4.5"/>
Line 17: <httpRuntime/>
Line 18: <pages controlRenderingCompatibilityVersion="4.0">
Source File: C:\inetpub\wwwroot\polygontechnologies.com\web.config Line: 16
Version Information: Microsoft .NET Framework Version:2.0.50727.5485; ASP.NET Version:2.0.50727.5491
So, as of now I have targetFramework="4.5" in web.config and in IIS application pool it is 4.0.
Can anyone help me in fixing the issue. TIA
Try changing your app pool to use framework 4.0
and if that doesn't work, try aspnet_regiis -i

Error about Single Signon using Azure AD

I tried to implement a single sign-on app following the tutorial here
http://geoffwebbercross.blogspot.com/2014/05/adding-azure-ad-single-sign-on-to.html
I added an active directory in azure and added a user for this tenant. Then I built a small app in VS2013. I used organizational accounts and typed in the domain name, logged in and created the project. While creating the project, there poped up a dialogue box said
Request_BadRequest: Invalid value found for property 'identifierUris' fo resource 'Application'
And I closed that. I tried to run the project on my local machine. It will have the information like this.
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module
IIS Web Core
Notification
Unknown
Handler
Not yet determined
Error Code
0x80070032
Config Error
The configuration section 'system.identityModel' cannot be read because it is missing a section declaration.
Config File
Requested URL
http:
Physical Path
Logon Method
Not yet determined
Logon User
Not yet determined
Request Tracing Directory
D:\My Documents\IISExpress\TraceLogFiles\
Config Source:
34: </system.web>
35: <system.identityModel>
36: <identityConfiguration>
More Information:
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
If you see the text "There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined", this error is because you are running a .NET Framework 3.5-based application in .NET Framework 4. If you are running WebMatrix, to resolve this problem, go to the Settings node to set the .NET Framework version to ".NET 2". You can also remove the extra sections from the web.config file.
View more information »
Any ideas of how to solve this issue?
I'm not sure what the root cause was (why you got the error while creating the project), but the following should resolve the error you're seeing when running the app.
In the the <configSections> section of your web.config you need to have the system.identityModel section defined. The entries should look something like this:
<configSections>
<section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<section name="system.identityModel.services" type="System.IdentityModel.Services.Configuration.SystemIdentityModelServicesSection, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</configSections>

launching a web service (.asmx) in a IIS 6.0

I have developed a web service with the .asmx extension using C# and i want to deploy this into my VPS which has Windows Server 2003 with IIS 6.
Service is running with Framework 4.0 and it's installed in the VPS also. When I upload the precompiled version into the VPS it shows a runtime error
Server Error in '/' Application.
Runtime Error
Description: An application error
occurred on the server. The current
custom error settings for this
application prevent the details of the
application error from being viewed
remotely (for security reasons). It
could, however, be viewed by browsers
running on the local server machine.
Details: To enable the details of this
specific error message to be viewable
on remote machines, please create a
<customErrors> tag within a
"web.config" configuration file
located in the root directory of the
current web application. This
tag should then have
its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are
seeing can be replaced by a custom
error page by modifying the
"defaultRedirect" attribute of the
application's <customErrors>
configuration tag to point to a custom
error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
can anyone help me on this?
Update
Server Error in '/' Application.
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 attribute 'targetFramework'. Note that attribute names >are case-sensitive.
Source Error:
Line 26:
Line 27:
Line 28:
Line 29:
Line 30: Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Source File: C:\Inetpub\vhosts\akashvahini.com\httpdocs\web.config
Line: 28
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET >Version:2.0.50727.3053
this is the new error message after enabling debugging in the web.config
You should enable debugging to diagnose the problem.
Microsoft has a very detailed explanation on how to enable detailed debugging over here.
Server Error in '/' Application.
That error is too generic, check the output after you enabled debugging and post the results.
And don't forget to disable debugging after your site goes live.
Update:
Seems to be permission related:
http://forums.iis.net/p/1042369/1454379.aspx
The ASPNET user account needs permissions for the folder that contains your asmx service.
Update2:
You can give the ASPNET user permissions using the file system permission dialog:
http://www.asp.net/learn/whitepapers/denied-access-to-iis-directories
Might look different on newer versions of Windows.
From my experience "Server Application Unavailable" means that you have got web sites that use different versions of .net in the same application pool.
the site that hosts your webservice needs to be in an app pool that only has .net 4.0 web sites. The application pool is configured on the Home Directory tab in the web site properties.
Looks to me like the application pool is trying to run two difference versions on .net.
Make a new application pool and call it something like .Net4 and then move the new site across to use this app pool and everything should work.
This error is shown by
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET >Version:2.0.50727.3053
Where the site with a .asmx should say .Microsoft .NET Framework Version:4.0 etc...

Error using 'var' after upgrading to Visual Studio 2010

We just recently upgraded from VS2008 to VS2010.
Our project compiles fine; but when we go to run the Web Application, we get the following error when opening Default.aspx:
Server Error in '/' Application.
Compilation Error Description: An
error occurred during the compilation
of a resource required to service this
request. Please review the following
specific error details and modify your
source code appropriately.
Compiler Error Message: CS0246: The
type or namespace name 'var' could not
be found (are you missing a using
directive or an assembly reference?)
Opening up the page, and mousing over the 'var' declaration, VS2010 correctly recognizes that it's type is a RegEx.
I'm thinking something funky might have happened in either our web.config or machine.config during the upgrade.
Anybody else run into this problem before? Any help would be greatly appreciated, hopefully it can save me some time diving into these files.
EDIT:
Here's the relevent section of code that's blowing up:
Line 10: protected void valSearchFreeText_ServerValidate(object source, ServerValidateEventArgs args)
Line 11: {
Line 12: var url = new Regex(#"http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?", RegexOptions.IgnoreCase);
Line 13: var html = new Regex(#"[<,>]", RegexOptions.IgnoreCase);
Line 14: args.IsValid = !html.IsMatch(args.Value) && !url.IsMatch(args.Value);
I don't believe that .NET 4.0 is the cause; we only upgraded from VS2008 to VS2010; we did not migrate from .NET 3.5 to .NET 4.0
I will double check on the ASP.NET Development Server vs. IIS and post back in a few minutes with the results from that. It's definitely being thrown from the Development Server.
Edit 2
This is being thrown from both the Development Server, and IIS.
System.Xml.Linq is also included in the assemblies section of our web.config:
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Check your web.config file for the configuration/system.codedom/compilers/compiler node. There should be a providerOption child node that determines the compiler version to be used. It ought to look like <providerOption name="CompilerVersion" value="v3.5"/>. It sounds like yours says 2.0 instead of 3.5.
Is the associated application pool in IIS set to use the .Net 4 framework?
Ensure that the target framework is set to 3.5 or higher
Also, double check that you have a good web.config file in the Application root folder (copy the recommended web.config and rename it.)

Categories

Resources