1

I'm new to NHibernate. Actually I'm trying to save the values ffrom two text boxes into MySql Database in asp.Net page. I that I got "Resource not found: WebApplication1.Sample.hbm.xml" error. But I can't fix this error. Can anyone help me to fix this one?

1 Answer 1

3

That sounds like the error you get if you do not set your hbm's Build Action to Embedded Resource.

Step by step for build action

EDIT References to set to Copy Local = True

  • Castle.Core
  • Castle.DynamicProxy2
  • Iesi.Collections
  • NHibernate
  • NHibernate.ByteCode.Castle
Sign up to request clarification or add additional context in comments.

7 Comments

Ya, tat problem fixed. But one more error arised tat "Object reference not set to an instance of an object." It shows in Textbox.
That is probably being caused because you have one or more libraries that NHibernate references set to Copy Local = true. I'll post a list of what's working for me in a moment.
Ya, I set NHibernate reference set to copy local= true. But still the same error
It doesn't need to just be the Nhibernate reference, you need either all of the above referenced and set to copy local, or if not referenced, then in a directory your app can find. If that still doesn't do the trick your going to need to dig deeper into the exception details. There's probably an Inner exception with more detail.
Now got another error tat "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" Its showing in textbox field
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.