DotNetOpenAuth OpenId Provider Intermittent issue while using with .Net 4.0 - asp.net

I was trying to use Sample application OpenIdProviderWebForms Application from DotNetOpenAuth-4.0.0.12084.
It was working fine with OpenIdRelyingPartyWebForms when I used it as it is but suddenly I started getting following error
Error while reading message
'DotNetOpenAuth.OpenId.Messages.CheckIdRequest' parameter
'openid.claimed_id' with value
'http://specs.openid.net/auth/2.0/identifier_select'. Invalid cast
from 'System.String' to 'DotNetOpenAuth.OpenId.Identifier'. (Contact:
, Reference: )
It happened just after I moved the provider application to .Net 4.0 using visual studio(2010)'s project properties. I noticed it was Intermittent. It was not visible each time.
I need help to understand the issue.
BTW the problem was resolved when I moved back to .net 3.5...
But I need this to work on .Net 4.0

I moved to DotNetOpenAuth v4.1.2.12274 and it was working...

Related

.net core to sqlserverce issue

I am trying to connect to a SQL Server CE (.sdf) file using the .Net Core console. I keep on getting the error below whereas the same code is working properly in the .Net Framework.
Can anyone suggest to me what the issue is?
The type initializer for 'System.Data.SqlServerCe.KillBitHelper' threw
an exception. ---> System.IO.FileNotFoundException: Could not load
file or assembly 'System.Security.Permissions
It is not possible and not supported, System.Data.SqlServerCe requires the full .NET Framework and Windows.
UPDATE It is actually possible (on Windows only) with .NET Core 3.x - see https://github.com/dotnet/corefx/issues/33897#issuecomment-536269132

Could not load file or assembly 'System.ValueTuple, Version=0.0.0.0

I have an ASP.NET MVC .net Framework 4.7 web application targeting a .net Standard 2.0 library that utilizes EntityFrameworkCore. I am getting this error when trying to run the project. I have tried to enable the auto binding redirects and inserting manual binding redirects. The manual ones at least gave me that it was looking for a different version number but still same error. Any idea on how to fix this?
I upgraded my .NET from 4.7 to 4.7.1 that is installed on my computer. This seems to have fixed the issue
I was having the exact same problem occurring on my testserver and not on my local computer.
After installing .Net framework 4.7.1 on my test server the problem was solved.

IIS .NET Framework, ASP.NET Version Mismatch

I have a .NET 4.0 web application which uses an asp gridview control to display data. The control will automatically sort data when a column header is clicked. I have this application running and sorting fine on both a dev and test server. However, on the prod server, it does not sort correctly. No error is thrown, it just does not act correctly. Since the code is identical I believe this has to be an environment issue.
When trying to troubleshoot this issue, I deliberately malformed the web.config in both environments and noticed the following difference when the error page is displayed:
Dev (code works as expected):
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249
Prod (code does not work as expected):
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.81.0
Could this be the cause of the issue? What exactly does this signify? Trying to find this answer on my own has proved fruitless. Any help is appreciated. Thanks!
This issue is caused by ASP.NET Version:4.6.81.0. When updating the dev server to match this version, the gridview does not sort correctly. I'm uncertain as to whether or not this is a bug in ASP.NET or a fix for a bug which was exploited by the code. Regardless, the original issue was caused by difference in ASP.NET versions.

Getting an error while trying to debug an ASP.NET (WebForms) app that I've migrated

I'm trying to migrate an ASP.NET 2.0 app (WebForms) to ASP.NET 3.5. I've finally fixed a 500.19 IIS 7.5 error I was having. Now it will run, so long as I don't attempt to debug it. If I do attempt to debug it I get an error message. I've searched for help on this error and there's precious little out there. Here's the text of the error message:
Unable to start debugging on the web server. Check for one of the following.
The application you are trying to debug uses a version of the Microsoft .NET Framework that is not supported by the debugger.
The debugger has made an incorrect assumption about the Microsoft .NET Framework version your application is going to use.
The Microsoft .NET Framework version specified by you for debugging is incorrect.
Please see the Visual Studio .NET debugger documentation for correctly specifying the Microsoft .NET Framework version your application is going to use for debugging.
Well, as far as I know, I'm using the correct version of the .NET Framework (3.5) for this app. Although I am not as familiar with IIS 7.5 on Windows 7.
I found that I had to get into IIS and change the application pool that my upgraded ASP.NET app was using. It had been assigned to an application pool that's associated with .NET 4.0. I changed it to one related to .NET Framework 2.0.

VS2010 converted project invalid reference

Opening a .Net 2 project in VS2010 it converts the project without any issues BUT when I attempt to build it fails.
The reason is that in VS2005 a reference was added to System.Web.Extensions which is a .Net 3.5 assembly. Now VS2005 never complained at this and quite happily worked but VS2010 is far more strict and won't allow it.
I've tried changing the targeted framework to .Net 3.5 but I get another situation there where the web page is never displayed, it simply hangs not even getting to Applicatin_OnStart.
Any help either on adding the reference with .Net 2 as target framework (prefered option for time) or getting the .Net 3.5 version to work would be greatly appreciated.
[Edit]
Ok so maybe the reference was a read herring. One of my colleagues opened the project and did the conversion and once he changed the targetted framework to .Net 3.5 it all worked. The difference between our machines is that he's on 32 bit XP and I'm on 64 bit Windows 7. When I change the targetted version and try to run the program the build seems to stop at CppCodeProvider and hang.
[Edit]
Check your web.config file for the references to System.Web.Extensions. It could be there are duplicate entries or entries pointing to older versions.
Check if the project is just targeting the client profile. The following link could provide you additional information: System.Web.Extensions Assembly cannot be resolved

Resources