Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# MarcoMangia 7/8/2009 5:05 PM
I followed all the steps following the tips as Martin's last post on medium trust with the last trunk
I have no more a security exception building all Castle binaries with AllowPartiallyTrust attribute. I replaced in the lib folder.
But Ioc is enable to resolve IAuthenticationService in AuthenticationModule, so a "The container has not been initialized!" exception is thrown.
I'm getting crazy

PS: I use this topic to say hello Martin and every contributors of Cuyahoga
# martijnb 7/9/2009 8:09 AM
There is probably still something wrong regarding medium trust. Could you debug the application startup from Application_Start in global.asax.cs and check what's wrong? You might even need to set the debugger to break on all exceptions.

The latest Cuyahoga trunk contains the right Castle libraries to run under medium trust.
# MarcoMangia 7/9/2009 6:17 PM
Assembly hell!!
1)Prb:
Castle.Facilities.NHibernateIntegration (re-built as APTC) references version 2.1.0.4000 of NHibernate.dll.
Res: -newVersion="2.0.1.4000" +newVersion="2.1.0.4000" in web.config

2)Prb:
The same for NHibernate.ByteCode.Castle.dll

3)Prb:
could not instantiate CacheProvider: NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache".
Res: It points to version 2.1.0.3001 of NHibernate.dll. So I added another binding policy:
bindingRedirect oldVersion="2.1.0.3001" newVersion="2.1.0.4000"

After that everythings builds and the container is not empty.

But running I met the worst: WebActivityManager
Simply it cannot run in Medium Trust, although Castle.Services.Transaction is also APTC.
The exception is the constructor, digging up the message "System.Runtime.Remoting.Messaging.CallContext.SetData() which is only
allowed if you have infrastructure permission". I tried to understand how this class was built as the mails in mark mail message
I was about to give in. Googling I found this and this.
Just to try, I replaced WebActivityManager with TLSActivityManager in services.config.

Buum, everything works!! I published quickly on www.progettazionestrutturale.it. The site works.

joy is a spoon of nutella...
Login doesn't work. Or best it doesnt work on IIS but my local webserver provided by vstudio. I returned home. It's true. The bad thing is that debugging is blind. It cannot intercept the reason of 404 error. You can try on Admin.

I am getting crazy again.. :(
# Constructor 7/9/2009 7:49 PM
In your web.config try changing:
< authentication mode="Forms">
   < forms name="CuyahogaUser" loginUrl="Login" protection="All" timeout="30" path="/" />
< /authentication>

to this

< authentication mode="Forms">
   < forms name="CuyahogaUser" loginUrl="Login.aspx" protection="All" timeout="30" path="/" />
< /authentication>

(the loginUrl="Login.aspx" goes to a file an not a route of MVC).
# MarcoMangia 7/9/2009 8:00 PM
nothing to do:

"The resource cannot be found" :(
# Constructor 7/9/2009 8:19 PM
If you are using the trunk maybe it will be fixed soon. I am using a custom version just until V2.0 is finished. I used the above to get the login working. The files must have been removed now it is back in development. I noticed that the indexing has been changed similar to how I post on the test thread. I can not wait until it is in alpha and almost done.
# martijnb 7/10/2009 3:43 PM
Uhhm, the trunk contained a Castle version that wasn't build properly, the last week.

I'm terribly sorry for any inconveniences. It's fixed now (with a fresh Castle build, new NHibernate 2.1 CR1 and a fixed WebActivityManager).
# MarcoMangia 7/10/2009 11:53 PM
In fact I got used to build directly from Castle trunk.

I tried this one but it doesn't work, that is, Admin is unreachable on IIS.
I could suppose there is a problem with rewriting/routing, I'm not very sure about that.

The bad thing is I don't know what specific event, if it exists, I should debug in the lifecycle of asp.net.
# martijnb 7/11/2009 10:15 AM
What IIS version are you using? The trunk needs IIS7 in integrated mode to work. There haven't been any efforts to make it work on IIS6.

Also, I still highly recommend NOT to use the trunk version in a production environment. It's not even Alpha yet.
# MarcoMangia 7/11/2009 12:41 PM
IIS6 on wk03 in integration mode. This is the environment provided from hoster.

I'd like to follow your tips.. I built everything around that trunk. I could not imagine the problem is about IIS :s

I could try to patch it, if you know the problem on IIS6 at least

Marco
# martijnb 7/13/2009 12:08 PM
There are several posts online that describe how to run MVC apps under IIS6.
From the top of my head, you could do it in two ways: add a special .mvc extension to IIS and your routes or add a wildcard mapping to IIS so that every request goes through ASP.NET (and the routing engine).