I need some HttpApplication local storage. I thought the ApplicationState was the place for this, but apparently this may be shared across HttpApplication instances in an Appdomain.
public class MyHttpModule : IHttpModule
{
private object initializingLock = new object();
private static HttpApplication last;
...
I'm making a very simple WCF (C#, .NET 4.0) licensing program that automatically emails a user a key they can use to activate the software they just bought.
My idea is my website would call a function provided by my service which would generate a key and then send the key the email provided. Later my software would also call that servic...
I'm not even sure i'm calling this the right thing. I'm just starting to get into ASP.Net and of course i'm starting to see syntax like <% "Code here" %>. So far i've seen <%: %>, <%= %>, <%# %>. Of course google doesn't like these symbols for searching so searching for help is futile :). Maybe this type of syntax is back from classic AS...
What may cause
System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required. Windows webclient
on Windows 7 virtual machine
WebClient client = new WebClient();
client.DownloadFile(Uri, "test.html"); // fails
string html = client.DownloadString(Uri); // fails
I can't see a...
I have a project which opens a simple Excel file and populates it. It was working fine until this morning, when it has suddenly started giving me the error above: 'Application' is ambiguous in the namespace 'Microsoft.Office.Interop.Excel'.
I haven't changed any project references, or anything within the file itself. The references incl...
In searching I came across http://stackoverflow.com/questions/411054/asp-net-mvc-page-subpage-routing and the wildcard was somewhat of a lifesaver, but presented a new problem.
Consider the following routes, if you will. The goal here is to have the index (http://www.domain.com) use the default route and [domain]/page use the Content ro...
Greetings everyone, i've been searching for awhile now and nothing seems to satisfy my desired output... All i want to achieved is to get the whole and same content of any file i uploaded, for my editing purposes in my editor w/c retrieves file from the database.
i.e of files are ".doc and .txt"and by the way what i meant by same conten...
I am having trouble injecting AutoMapper into an ASP.NET MVC 2 application using Ninject. I used Jimmy Bogard's post on AutoMapper and StructureMap type Configuration as a guide.
public class AutoMapperModule : NinjectModule
{
public override void Load()
{
Bind<ITypeMapFactory>().To<TypeMapFactory>();
Bind<Config...
I would like to load an assembly into ASP.NET's AppDomain from the another app domain. Microsoft's Cassini does this by calling an internal class (BuildManagerHost.RegisterAssembly). I would like to do this using just public APIs, at least on the Mono platform because this internal class does not exist there.
What I have tried:
AppDo...
Hello,
I am trying to create a simple Windows Service. The User Account for the service is NetworkService Then i ran installUtil from command prompt and i got this :-
The Commit phase completed
successfully.
The transacted install has completed.
which means the service got installed successfully. But when i try to run it fr...
When i install VS2003 and VS2005/2008 on the same machine. All DLLs goes to the GAC. So GAC contains .net 1.1 and .net 2.0/3.5 dlls.
When i load visual studio 2003,how does it reference only 1.1 dlls. how does it resolve ambiguity as multiple versions with same name exists.
...
how to create identicon for email with c#?
...
My desktop application requires .net 4.0 full package. Why full package?
I am using next api that belongs to full package.
System.ComponentModel.Design.CollectionEditor
HttpUtility.HtmlEncode
HttpUtility.UrlEncode
HttpUtility.UrlDecode
Then even I have set in setup project requirements only for .net 4.0 full package, during install t...
Hi All,
I am trying to download images from the site. The code which i am using is working fine till the image is available. If the image it not available it is creating problem. How to validate availability of the image.
code:
Method 1:
WebRequest requestPic = WebRequest.Create(imageUrl);
WebResponse responsePic = requestPic.GetRes...
Hi,
I have a application use Webrequest to post and get some data from a server with a SSL certificate. It is all very well except on Windows 2008 x64. The server return error 403 forbidden.
thanks in advance.
burns
...
Christian Moser provides on his page a SharedResourceDictionary for WPF so that resource are only initialized once.
I´ve tried to use this ResourceDictionary in my Silverlight 4 application, but i´m getting COMExceptions in Visual Studio or a message that the element is already a child of an other element.
Has anyone successfully used ...
In my facebook canvas applikation, i store the access token in session. (I use ASP.NET MVC)
But i want to store the access token in a database along with the facebook user id that i can save different access tokens for different facebook users accessing my application.
So when i query the facebook user id and if it doen't return any ac...
I have a a dynamic value (implementation of IDynamicMetaObjectProvider) that I'd like to call methods and properties on.
Examples I have found so far of invoking members on a dynamic value use types out of Microsoft.CSharp.dll, e.g.
IDynamicMetaObjectProvider x = GetDynamicValue();
CallSite<Func<CallSite, object, object, object>> site ...
Is there any .NET BCL for NTPClient?
I have seen a few implementations of NTPClient here and here.
But does .net provide any library for doing this?
...
I have a string value which is a datetime : "20100825161500" and I want to convert this to a System Datetime. I have tried Convert.ToDateTime and DateTime.Parse and these do not work.
...