castle windsor, which dll folder I should use? - reference

I download the latest copy of castle windsor. there are 2 folders, one is net40, another one is net40-client. which one I should use for my asp.net mvc3 application. I am using vs2010.
the tutorial I read from the castle windsor wiki web site tells me to use dll files in "net40" .
if I use NeGet to install the package. I notice It only has net40-client folder.
can some one please explain to me the difference between those 2 folders and which one I should use.

I think that net40 and net40-client are basically the same except the later does not depend on System.Web and, therefore does not have the per web request lifestyle.
I found this post that confirms that (kind of - it would be great if there were a definitive page somewhere that outlines the differences but I could not find one): http://www.mail-archive.com/castle-project-users#googlegroups.com/msg09398.html
Given you are in asp .net anyway I would suggest you went with the net40 version (as you will already be building against that profile).

Related

How do I rename nlog.config?

A while ago, I developed a WPF control and integrated into a third-party solution.
Just my luck, turns out the supplier also now use nlog (v2), which they have registered in the GAC. They don't currently use an nlog.config file, although they could do at some point.
I have used nlog v4, which isn't registered in the GAC but resides in the project's output folder instead. I do use an nlog.config file.
Two issues I would appreciate your advice with:
How would I isolate our nlog config file, can I rename it?
Would it be considered good practice to register my nlog.dll (v4) in the GAC also?
Your second question:
Would it be considered good practice to register my nlog.dll (v4) in the GAC also?
I would not recommend to use the GAC if it's not required. It makes upgrading more complicated and it's less transparent. NLog 4 is fully semver compliant, so it's easy to upgrade when keeping your nlog.dll in your local bin.

Azure publish package content

When I "publish" or "package" the Azure "cloud service" WCF that I have, does the publish or package actually include the source codes for my application or is just the binary that is getting published. Is there a way that Microsoft can see the code of my application? Is it safe to assume that the actual C# codes are not being published or be seen in the Microsoft server? If binary is being published, there is no way for a binary to be reverted back to source code right? I'm just trying to protect my intellectual property.
The binaries get deployed.
Any .NET library can be decompiled pretty trivially, though there are obfuscation tools that make the decompiled code more difficult to read (See Open Source Alternatives to Reflector? for a discussion on open source decompilers).
Personally I wouldn't be concerned about Microsoft decompiling and stealing your IP. Anyway, any hosting provider would have similar access to your deployments.

monotouch bindings project to framework

What are the correct steps to creating a bindings project for a Framework versus a library? (Yes, they are close to the same thing, but NOT the same, the framework is a directory structure with header files, library and resources). These are what I've come up with, note that none of the Framework specific steps are documented as far as I can tell at the Xamarin web site (please prove me wrong).
Create the bindings project via MonoDevelop wizard.
Generate the ApiDefinition.cs and StructsAndEnums.cs files with btouch or by hand.
Copy the file from the root of the framework directory to lib.a (e.g., ArcGIS to libArcGIS.a) and add it to the project. It is important to note that the file without any file extension in the framework directory is in fact a library file.
?? Include framework resources ??
You'll notice that I get foggy at the third step. How to you add these resources to the bindings project? The large part of the bindings project links and runs fine, but I think it crashes at times because it is missing an expected resource.
You must (a) create a C# contract that describes the Objective-C contracts and how you want your projection into C# to look like, and (b) statically distribute the library with your project.
To kick the automatic population of the linkwith.cs you must rename the framework library (for example MyFramework) to use the library pattern (in this case, "libMyFramework.a")
Resources you have to select and flag as resources, they will be bundled directly into your app, and extracted when the library is consumed.

Why can BuildProvider be used only with ASP.NET website projects?

I was going to try Subsonic, you can generate DAL with buildProvider element in an ASP.NET website project. But I get curious why Web applications or windows applications do not support BuildProvider.
PS: I know for Subsonic there is one other option to use it with other than BuildProvider, but I just get curious.
It doesn't work because of the different way things are compiled in web application projects vs. website projects. From what I read on MSDN, it has to do with the fact that in web app projects, all your code files are compiled into a single assembly using MSBuild before deployment, but Build Providers are used to generate code that is compiled at runtime (from your App_Code folder).
In website projects, all of your code is compiled at runtime so it all plays nicely together.
You could possibly hook it into your pre-build event, and call the sonic.exe with the proper command line.

.NET 3.5 Service Pack 1 causes 404 pages on ASP.NET Web App

I have a problem with IIS 6.0 ceasing to work for an ASP.NET application after installing Service Pack 1 for .NET 3.5.
I have 2 identical virtual dedicated servers. Installing SP1 on the first had no adverse effect. Installing it on the second caused ASP.NET pages to start returning 404 page not found.
Static .html pages working okay on both servers.
Has anybody else experienced this?
This is broad problem, so let's start by asking some troubleshooting questions:
Based on your description, the ASP.NET runtime is not catching your request and processing the aspx files. You may need to register the asp.net pipeline with IIS again using ASPNET_REGIIS -i.
Have you made sure that the app_offline.htm file has been removed
from the directory of the application?
I have had this happen before after an
update.
Have you setup fiddler for instance to follow the request to see what is
exactly being requested?
Make sure ASP.NET is enabled in the IIS Administration Console under "Web
Service Extensions." Make sure everything is set to allowed for your different versions of the framework.
Well, let's start with those and hopefully we can guide you to the problem.
I've seen various people with this problem recently. This link might help.
And this one.
And a few others.
Is CustomErrors in your web.config set to On or RemoteOnly? If so, what do you get when you change it to Off?
I have not had this exact error with .NET 3.5 SP1, but have seen similar occur in the past. Typically it can be resolved by opening a command prompt, going to the appropriate .NET folder and running ASPNET_REGIIS -i. In the case of .NET 3.5 there wasn't an update to the main bits of the framework, so you'd actually go to the .NET 2.0 folder, which on my machine can be found at:
\Windows\Microsoft.Net\framework\v2.0.50727
Running the ASPNET_REGIIS -i will re-register all the ASP.NET libraries with IIS, and should be the equivalent of a re-install of the framework on a given machine (as far as IIS is concerned)
Just to clarify. The last (4th) point given by Dale was the problem. During the installation of SP1 the Status for ASP.NET and WebDAV became set to Prohibited under Web Service Extensions.
Why the installation of SP1 changed this setting on one server and not the other is a mystery that I wouldn't mind (but not expect) an answer to...
The second link provided by CodingTheWheel also had the answer so I'm also going to mark this as an answer.
No-one did before, so I'll point to the trivial solution:
Have you already de-installed the Service Pack and re-installed it again (or the whole framework)?
Edit: #Kev:
Easy explanation: He said the update works on one machine, but not on the other. I had similar problems in the past and re-installing helped to solve some of them. And it is trivial to do.
That's my approach:
1. trivial
2. easy
3. headache
You are right, on productive systems you must be careful, but that's his decision. And because it is a virtual server, maybe it is easy for him to copy it and try as a test environment first.

Resources