If you host your WCF service in the IIS web server and have the problem, that the URLs of the WSDL files contain internal domain names (or your machine names) that cannot be resolved by the clients when trying to consume the service you will find three possible options to resolve this issue in this [...]
Read more…Posts Tagged ‘.NET’
My daily DotNetNuke: Workaround for “Validation of viewstate MAC failed” exception when using the DNN 7 login form in multiple tabs
As I’ve written in one of my previous posts, I found out that one gets a “Validation of viewstate MAC failed” exception when submitting a DNN login form and the login status has changed from “not logged in” to “logged in” after the login form initially was loaded (e.g. by using an addition browser tab [...]
Read more…My daily DotNetNuke: ModuleController.UpdateTabModuleSetting() truncates setting names to 50 characters
This is the second blog post in my new “My daily DotNetNuke” blog series and it’s about a problem I found out when saving TabModuleSettings in my custom module. Generally, saving ModuleSettings and TabModuleSettings in DotNetNuke is very straightforward: The DotNetNuke.Entities.Modules.ModuleController offers two simple update methods: UpdateModuleSetting(int ModuleId, string SettingName, string SettingValue) for updating ModuleSettings [...]
Read more…My daily DotNetNuke: “Validation of viewstate MAC failed” exception when using the DNN 7 login form in multiple tabs
Update 2013-04-18 It turned out, that this is not a bug, but a security feature in DNN. I written an new blog post that describes a possible workaround. This is the first blog post in my new “My daily DotNetNuke” blog series. For a while now, I’m developing custom DotNetNuke modules and skins and I [...]
Read more…ASP.NET MVC 4 RC & ASP.NET Web API: Implementing custom XmlMediaTypeFormatter that ignores XML namespaces
In this blog post I will show how to implement a custom XmlMediaTypeFormatter that extends the default ASP.NET Web API XmlMediaTypeFormatter in a way that it ignores XML namespaces when parsing xml messages. By default the ASP.NET Web API XmlMediaTypeFormatter is not able to parse XML requests that contain any XML namespace declarations. If you [...]
Read more…ASP.NET MVC 4 RC & ASP.NET Web API: Return “HTTP Status code 4xx” instead of throwing InvalidOperationException “No MediaTypeFormatter is available to read an object of type ‘[...]‘ from content with media type ‘[...]‘”
By default ASP.NET Web API (included in ASP.NET MVC 4) throws the following exception when trying to process a request with an unsupported content-type (like “text/plain”): System.InvalidOperationException No MediaTypeFormatter is available to read an object of type ‘[...]‘ from content with media type ‘[...]‘. IMHO, sending a wrong content-type is a client-side error, and the [...]
Read more…