- added cms,businesslogic and umbraco dll's to my project
- added refences to those dll's.
- added the usings and the code
- and then I get the following error when I try to debug:
Could not load file or assembly 'umbraco.DataLayer, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
so i added the umbraco.datalayer.dll and added a reference to it.
when i run again i get this error on the line that defines the user:
The type initializer for 'umbraco.BusinessLogic.Application' threw an exception.
so in short does anyone have some more information on how to do this??
How are your trying to acomplish this? Is this a Programm outside of umbraco and IIS (seems to be the case!)? Then your should do it via WebServices (look into umbraco/webservices/)! If this is e.g. an ActionHandler you could try to put your code in the App_Code Folder of the Web-Project where you would have no problems about referencing dll's and try it again. If everything works okay from there you know that you ar missing some references.
Maybe you could try to explain what you would like to do...
adding a new document/content node via API
hi,
I'm totally new to umbraco and recently started programming again (so I could have made mistakes on both fields).
I'm trying to add new content with c# as descibed in the API cheatcheat (http://our.umbraco.org/wiki/reference/api-cheatsheet/creating-a-document)
steps i took:
- added cms,businesslogic and umbraco dll's to my project
- added refences to those dll's.
- added the usings and the code
- and then I get the following error when I try to debug:
Could not load file or assembly 'umbraco.DataLayer, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
so i added the umbraco.datalayer.dll and added a reference to it.
when i run again i get this error on the line that defines the user:
The type initializer for 'umbraco.BusinessLogic.Application' threw an exception.
so in short does anyone have some more information on how to do this??
Take a look intot the code of my Codegarden 09 Session. In Sample 1 I added some nodes programattically...
hth, Thomas
hi thomas,
I googled and found some info about that session, but I haven't found the code anywhere. Could you please be so kind as to provide a link for me.
thanks a million!
Ruben
Hi there!
How are your trying to acomplish this? Is this a Programm outside of umbraco and IIS (seems to be the case!)? Then your should do it via WebServices (look into umbraco/webservices/)! If this is e.g. an ActionHandler you could try to put your code in the App_Code Folder of the Web-Project where you would have no problems about referencing dll's and try it again. If everything works okay from there you know that you ar missing some references.
Maybe you could try to explain what you would like to do...
Toby
Sorry, missed the link: http://our.umbraco.org/wiki/codegarden-2009/codegarden09-sessions/the-box/using-webservices-in-umbraco
Code can be found on my blog: http://blog.thoehler.com/2009/07/23/summary-of-my-cg09-session
And as Tobias pointed out, take a look at the build in webservices (in 4.0.x not completely implemented, so you have to check if they are ok for you)
hth, Thomas
I was trying to accomplish it via a program outside umbraco and iis, but I didn't use a webservice. Stupid mistake.
thanks for the help and the links guys, I'll start over and see if I can get it to work now. ;-)
is working on a reply...