When you are troubleshooting IIS issues there are tools like Failed Request Tracing, IIS logs, etc. which will let you see what is going on. But what do you do when IIS itself is not working? A common cause is that the applicationHost.config file is corrupted. Perhaps there was a manual modification made to it […]
Read More →Archive for May, 2012
Using PowerShell to find the Process Id (PID) of an Application Pool
With the release of Windows 8 Server comes a new version of PowerShell. You can check which version of PowerShell you are using by executing the command show in Figure 1. Figure 1, Which version of PowerShell am I using To get a list of application pools existing on the web server enter the following […]
Read More →NHibernate mapping experience with an ambiguous reference
Sometime things don’t always go as planned. I was making some nice progress with the process of mapping a database and all of a sudden I get the following compile time error message. Ambiguous type reference. A type named “Attribute” occurs in at least two namespaces. “Attribute” ist ein mehrdeutiger Verweis und kann “System.Attribute” oder […]
Read More →NHibernate PropertyAccessException Invalid Cast, specified cast is not valid
If you receive this error then you have probably mixed up some data types between your class (class.cs) file and your mapping (class.hbm.xlm) file. For example you have a property defined in your class file as a string and then in your mapping file as an int. To repair the PropertyAccessException Invalid Cast (check your […]
Read More →Displaying detailed error messages in IIS
One of the first questions I ask when troubleshooting an IIS case is “What HTTP Status code are you receiving?” I ask this question because it sets the direction for further analysis. In this example I want to discuss the 404 status code and how you might need to make some changes or do some […]
Read More →Custom Error Pages – HTTP Error 500.19 – Internal Server Error
Rendering custom error pages can be helpful when, for example, the custom error page provides some information on how to resolve the error. Perhaps if a client attempts to access a file which does not exist on the web site, meaning they receive a 404 HTTP status code, you can render a page which has […]
Read More →NHibernate error, incorrect syntax near the keyword
Common sense, maybe…, worthy of a blog, absolutely. I was creating an ordering system using NHibernate and the table which stored the orders was called ORDER. This resulted in an error, which I believe would come from any data retrieval source, I just happen to be using NHibernate with SQL Server and Oracle. The error […]
Read More →Updating Child records with NHibernate using HQL-IQuery and C#
I tend to overcomplicate things, I think that I do it subconsciously in an attempt to make sure I give due diligence in the search for the best solution. I had a parent child relationship mapped out using NHibernate. Something like the below where there is a one-to-many bag in the parent class and a […]
Read More →Invalid Index N For This SqlParameterCollection using NHibernate
While trying to insert parent child composite key linked into a database I received this error: Ungültiger Index N für SqlParameterCollection mit Count=8 Invalid Index N For This SqlParameterCollection with count=8 When I added the: insert=”false” attribute to the 8th property in my mapping file, the issue was resolved. Start with the ID at 0 […]
Read More →Inserting Parent Child records using NHibernate IDENTITY INSERT OFF
One of the errors I received when I was trying to get the parent child insert to work with NHibernate was: Ein expliziter Wert für die Identitätsspalte kann nicht in der ‘CHILD’-Tabelle eingefügt werden, wenn IDENTITY_INSERT auf OFF festgelegt ist Cannot insert explicit value for identity column in table ‘IdentityTable’ when IDENTITY_INSERT is set to […]
Read More →