- Follow MSDev.pro blog on WordPress.com
Follow us
-
Recent Posts
Categories
Recent Comments
Archives
Category Archives: Development
XslLoadException: The type or namespace name ‘SecurityRulesAttribute’ does not exist in the namespace ‘System.Security’ (are you missing an assembly reference?)
While porting a project from .Net 3.5 to .Net 4 we got this weird error. The error occurs when loading an XSLT in memory. Here is the failing piece of code (simplified): private static XslCompiledTransform ReadXslt(string fname) { XslCompiledTransform xsl … Continue reading
Posted in .Net, Development
Tagged Extension object, SecurityRulesAttribute, XslLoadException
1 Comment
Advanced logging in IIS 7.5
In the standard installation of IIS 7.5 it is not possible to log the incoming requests, not the outgoing responses. The reason for this is probably that Microsoft wants to keep the attack surface as small as possible. But I … Continue reading
Posted in Computers and Internet, Development, IIS, Logging
Tagged 80070032, IIS 7.5, Logging
2 Comments
Rediscovered the Debug attributes
There are 2 attributes that can easily be applied to your classes / methods to modify the behavior at debugging time. The attributes don’t change the runtime behavior of your code. [DebuggerDisplay] This attribute defines how you’ll see a type … Continue reading
FuslogVw–debugging assembly loading
We’ve all had it before: referencing some libraries, recompiling the project and then the variation on the DLL hell: the assembly hell. Suddenly one of your assemblies (or on of its dependent assemblies) doesn’t load anymore. Debugging this can be … Continue reading
WCF – use a file in the App_Data folder
If your web service needs information from some external files, a logical place for these files is the App_Data folder. To get the fysical path of the file in a WCF service you can use this code: RolemappingPath = HostingEnvironment.MapPath(@”/App_Data/RoleMapping.xml”); … Continue reading
Posted in Development
Leave a comment
WCF – Issue a request over https with custom header
In my current project I need to call a web service over https. Security is implemented by using a custom header (old school). To support this in WCF follow the following simple steps: In the configuration file (app.config) make the … Continue reading
Posted in Development
Leave a comment
CLR trigger – External access
By default when you create a CLR trigger, VS 2008 will deploy it as a SAFE trigger: CREATE ASSEMBLY HelloWorld FROM @SamplesPath + ‘HelloWorld\CS\HelloWorld\bin\debug\HelloWorld.dll’ WITH PERMISSION_SET = SAFE; This is good, you always want to start with the minimal … Continue reading
Posted in Development
Leave a comment
MS Access has a problem with date/time fields when the Milliseconds aren’t 0.
I was trying to add a record with a date/time field in an MS Access database like this: const string UpdateContactPersonSQL = "UPDATE ContactPerson set Firstname = ?" + […] ", ModificationDate = ? " + "WHERE ContactpersonID … Continue reading
Posted in Development
Leave a comment
MIME Type Detection in Internet Explorer
Just a quick one: here you can find the possible values for Response.ContentType, like: Response.ContentType = "application/x-zip-compressed"; http://msdn.microsoft.com/en-us/library/ms775147(VS.85).aspx Tags van Technorati: mime,asp.net,ContentType
Posted in Development
Leave a comment