Archivi del mese: aprile 2014

WebClient on portable library – Consuming Rest service async

If you are looking for WebClient inside a portable library, use nu get. Find Microsoft.Net.Http and download Microsoft HTTP Client Libraries And here how to use HttpClient (this is an old post): Portable HttpClient for .NET Framework and Windows Phone

Pubblicato in .Net, c#, Portable, Silverlight | Contrassegnato , , , | Lascia un commento

Show Modal popup from other page using Bootstrap

I like put the code of the popup in a separated page. In this example I put the popup code in mypage.htm and this is the code of default.html As you can see, I haven’t write any line of javascript … Continua a leggere

Pubblicato in Asp.Net, Bootstrap, c#, jquery | Contrassegnato , , , , , | Lascia un commento

ASP.Net FindControl recursive

Use this class to add the extension method FindControlRecursive

Pubblicato in Asp.Net, c# | Contrassegnato , , | Lascia un commento

asp.Net Routing HTTP Error 404 using dot(.) in url

Using MVC or ASP.net routing you’ll get an error if you using a dot (.) in the url. HTTP Error 404 this is my global.asax where I register my instance of IRouteHandler global.asax This url fail with HTTP Error 404.0 … Continua a leggere

Pubblicato in .Net, Asp.Net, MVC | Contrassegnato , , , , , | Lascia un commento

Convert SOAP Web Services .asmx to WCF Services .svc

I’ve converted an .asmx server to .svc services. Here a list of witch code I’ve changed from .asmx to .svc infrastructure: SOAP (.asmx) WCF (.svc) this.Context.Cache MemoryCache.Default (include System.Runtime.Caching.dll) Server.MapPath HostingEnvironment.MapPath Server.HtmlEncode HttpUtility.HtmlEncode

Pubblicato in .Net, Asp.Net, c#, WCF | Contrassegnato , , , , | Lascia un commento

The remote server returned an error: (406) Not Acceptable

This error occurs very infrequently in Web browsers, because most browsers will accept any data returned from the Web server. If the client is not a Web browser, then anyone can only investigate the problem by looking at the Accept … Continua a leggere

Pubblicato in c# | Contrassegnato , , , | 2 commenti