ASP.NET Browser Caps update - asp.net

I'm trying to update the browser caps using the ".browser" files (browserCaps section of the web.config is deprecated in .NET framework 2.0). So far, I found this project on CodePlex that provides updated files:
http://aspnet.codeplex.com/releases/view/41420
From the Visual Studio 2008 command promt, I ran the command "aspnet_regbrowsers -i" wich creates an assembly (ASP.BrowserCapsFactory.dll) and installs it in the GAC.
So far so good, the updated definitions take effect in my asp.net application.
The question is, is it possible tu use that assembly outside the GAC, like add it as reference in a Web application (I tried it and unless I'm doing something wrong, it doesn't work)?
I'm aware of the "App_Browser" folder solution, but I'm looking for a solution that will ensure the same browsers definitions for several web application without having to put an assembly in the GAC.
Thanks in advance for your answers!

ASP.NET 4 White paper
According to ASP.NET 4 whitepaper, you can manage browser capabilities within your code by extending the ASP.NET Browser capabilities or totally replace it. So far, it's the best you could do instead of using the aspnet_regbrowsers

Related

What default dll's are imported into an asp.net webforms project

I've inherited a legacy code base that doesn't currently compile and has no project or solution file (there are multiple repositories including winforms and asp.net).
I'm not certain what .net version the original code was written in, nor what the project template was, although I know some are web forms.
I'm re-creating new solution and project files to import the code into, but need to find some of the default dll's included in old Visual Studio project templates (e.g. webforms).
Any ideas where I might find this information?
Anyone know an MSDN link with this on it?
P.S. I don't have access to the production code, although it is running in production.

Is it necessary to manually add <AutoGenerateBindingRedirect> metadata to the Core project file to correctly reference assemblies?

I'm using Visual Studio 2013 and MvvmCross to create an Android application using Portable Class Libraries.
I notice in my first view model, CatalogViewModel, some code is highlighted as not referencing the correct assemblies or unable to be resolved (the code builds fine even with these issues).
Examining the .NET Portable Subset assembly in the Object Browser shows various System assemblies included (2.0.5.0 v2.0.50727 & v4.0.30319, 4.0.0.0, 5.0.5.0). Automatic binding redirection for assemblies in .NET Framework 4.5.1 can be enabled or disabled by adding this line to the .csproj file.
<AutoGenerateBindingRedirect>true</AutoGenerateBindingRedirect>
or
<AutoGenerateBindingRedirect>false</AutoGenerateBindingRedirect>
This seems to solve the referencing and redirection issues in the IDE. I haven't found any information about this manual modification to the Core project file in any of the MvvmCross info online I reviewed so I wanted to post a question here to see if anyone had some information or best practices.
No, you shouldn't need AutoGenerateBindingRedirect. This feature is intended to generate binding redirects for non-platform assemblies, such as NuGet packages. Platform assemblies should be unified automatically by Visual Studio / MSBuild.
Which seems to work, since you pointed out:
the code builds fine even with these issues
So this looks like a bug in ReSharper. The fact that adding AutoGenerateBindingRedirect fixes your ReSharper issues might be a side effect of something else.

Compiling ASP.NET

I'm compiling ASP.NET code for the first time ever and I'm stumped.
I downloaded MINGW-Get and just finished installing it. The client gave me the source code and I found a file called RSConfig.exe.
So I assumed that was the config file, ran it, and then tried "make" but got the error
No targets specified and no makefile found. Stop
Any idea what I'm supposed to do? I don't see anything that would resemble a makefile in the source code.
Thanks in advance!
Do yourself a favour and install Visual Studio Express:
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express
It makes development easier and fast
It sounds like you might want to get familiar with the background concepts around asp.net and it's defacto development environment Visual Studio (there are many versions of visual studio).
As Andrei recommends, using Visual Studio Express is a good free way of getting started. The version most suited for web development is Visual Web Developer Express.
Attempting to compile .net code from a toolset such as MinGW isn't a typical route for using asp.net, however I've not used MinGW before and not sure it's possible to compile .net code from it.... Although it is perfectly possible to compile .net code from the command line (using the .net framework sdk) , I certainly wouldn't recommend it if you are getting started.
I'm going to make a guess that it is an ASP.net web forms project, it being the most prolific asp.net project type at the moment.
This official asp.net site http://www.asp.net/web-forms will guide you through what web forms are and how to get the development environment setup. Having this sort of background will aid you in solving your particular situation.

ASP.net and devexpress scheduler, works local, does not work live

Hi guys I got some code here thats buggin me.
ive managed to create a page and get it working on local host, but when i publish this to go live and nav to the web page it comes up with this error.
Could not load file or assembly 'DevExpress.Web.v11.1,
Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a' or
one of its dependencies. The system cannot find the file specified.
(E:\web\shafteccom0\htdocs\Calendar\web.config line 44).
Ive tried adding all the references, and i mean all of the dev express ones, including ones i dont even need.
my project is a web project using visual studio 10, asp.net,C# & .Net version 3.5
ive also tried changing the .net version to 2.0, 3.0 and 4.0 but no luck.
If you need my code let me know and ill edit this.
Many thanks
That error means that the library that your application is looking for does not exist on the server you are deploying it to (or it cannot load it with the variables provided). Does the live server have the VS2010 references installed to it?
Just making sure: Are you sure your references set to "CopyLocal"?
I think DevEx installs it's assemblies in the GAC, so your local copy may be working but not when you deploy. Have you tried looking in the bin on the publish location to see if they are actually there?

How to add extra functionality to a compiled and hosted website in ASP.NET?

I have an ASP.NET 2.0 legacy website with me, in which I have to fix two bugs in the website.
The problem is that we ( me and client ) do not have the source code for this website.
All we have is the FTP where the compiled and hosted version of the website resides.
Now, we are pretty sure that the developer has not intentionally done anything to obfuscate that compiled code with any other third party tools. He have just used the standard Visual Studio compiler.
My questions are
Is it possible to get the source code from the compiled version?
How can I get the source code from this compiled version?
What other options do I have?
Will .NET reflector be handy to extract the code?
Yes, .Net Reflector should be all you need to decompile the code (without comments, anyway).
Try opening the DLL files from the bin directory inside .Net Reflector and see if you can make sense of it.
EDIT: It appears that after investigating ILSpy, which Adrian Iftode mentioned, there is an open source plugin for .Net Reflector called Reflexil that does what you need - modifying compiled DLLs. That would be well worth a look at!

Resources