Method can not be reflected && 'date' is an invalid value for the SoapElementAttribute.DataType property. The property may only be specified for primitive types.

by Rok Bermež 4. September 2009 14:21
Annoying bug described in can be easily fixed by removing DataType="date" from SoapElementAttribute attribute. When you see: [System.Xml.Serialization.SoapElementAttribute(DataType="date", IsNullable=true)]   public System.Nullable<System.DateTime> BlaBLa just replace with: [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]   public System.Nullable<System.DateTime> BlaBla


.Net | ASP.NET | Live Mesh | Visual Studio

Paste XML as XElement

by Rok Bermež 22. May 2009 11:17
Generating XML in c# can be a time consuming task. 'Paste XML as XElement' Visual Studio extension can save you a lot of time. You can find this extension in Visual Studios samples directory:C:\Program Files (x86)\Microsoft Visual Studio 9.0\Samples\1033\CSharpSamples.zipExtract PasteXmlAsLinq project and compile it.Add PasteXmlAsLinq.AddIn and PasteXmlAsLinq.dll to one of the Visual Studios AddIn folder (you can see or add them in Tools|Options|Environment|AddIns)Restart the Visual Studio Now you have extra menu item and you can directly paste XML like <?xml version="1.0" encoding="utf-8" ?> <rootElement> <element id="1"> <podatek>aaa</podatek> </element> <element id="2"> <podatek>bbb</podatek> </element> </rootElement> to XElement xml = new XElement("rootElement", new XElement("element", new XAttribute("id", "1"), new XElement("podatek", "aaa") ), new XElement("element", new XAttribute("id", "2"), new XElement("podatek", "bbb") ) );


.Net | c# | Visual Studio

Hosting a WCF Service in IIS 7

by Rok Bermež 20. May 2009 14:09
Hosting classic ASP.NET web services on IIS7 work out of the box, while WCF services do not. In order to enable them you have to run (with administrative privileges) this command"%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r –yIf WCF service is public, be sure not to forget to add custom binding configuration with security options turned off. <security mode="None"> <transport clientCredentialType="None" /> </security>


.Net | ASP.NET

ASP.NET Profile in Visual Studio 2008 Web Application Project

by Rok Bermež 18. May 2009 15:35
I like and use Web Application Project way more than 'Web site' type project. The only problem with it is, that  ASP.NET Profiles are not supported out of the box. Workaround for this is ASP.NET WebProfile Generator, which you can find and download here on codeplex.


.Net | Visual Studio | ASP.NET


<<  June 2018  >>

View posts in large calendar

Page List

Month List