ReBuildAll Blog
Thoughts (mostly) on .NET development


Vitor Re: SQL Server User Instances and the Database 'abc' already exists mystery
This worked fine, thanks
pregunton Re: WCF service namespaces (getting rid of
I'm newbie and confused about it.

Why address is "RebuildallService.svc" ?

Which is the URL for WSDL ?
Which is the URL for Endpoint Address?

I think is not the same.

http://server/virtualdir/Rebuildallservice.svc?WSDL is the url for WSDL is endpoint address

Maybe if I want configure HTTPS is more complicated.
rahul Re: WCF service namespaces (getting rid of
giv me sol this error

The type 'WebService.Service1', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
ewebbi Re: WCF service namespaces (getting rid of
Jake O Re: ASP.NET MVC and virtual views
Anyone have any luck doing this with Razor HTML?
Ofer Re: Running .NET threads on selected processor cores
You could not put it clearer. Thanks a lot, it's been a great help!
Andreas Re: ASP.NET MVC and virtual views
Was able to get it to work:

Andreas Re: ASP.NET MVC and virtual views

I agree with Wednell, I have not been able to get it to work with MVC5.

I posted this sample with Mvc5:

GetFile is never called and an exception is thrown as soon as FileExists returns true and a File does not exist.

I do not know where to go from here, Kind blessings

ali Re: ASP.NET MVC and virtual views
my virtualpathprovider work when i run project with visual studio and iis express
but not work when i publish this on iis
plz help
Lenard Gunda Re: ASP.NET MVC and virtual views
Hi Wednell,

I played around in MVC 5 recently with compiling and serving Razor views from a .DLL. I will have to check what I did, because I did not run into any trouble there. Of course there I did much more than just serve views as I needed to compile them as well, but the basics should be the same. Let me get back to you on this one.

Wednell Re: ASP.NET MVC and virtual views
Maybe it worked in mvc4 but in mvc5 this does not work GetFile is never called. If FileExits returns true is bypassed and IIS assumes it can get it which results in a:

HTTP Error 404.0 - Not Found

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Any suggestions?
amir Re: ASP.NET MVC and virtual views
strong_wind Re: Moving ASP.NET Identity model into another assembly
I agree with Rich C. I'll try to get that code out of my AccountController.
How did you do it, Rich?
Re: jQuery validate and the comma decimal separator
Rich C Re: Moving ASP.NET Identity model into another assembly
This worked perfectly as described. And to answer Konstantin's question, all you have to do is add a using statement on the AccountController.cs file for the namespace (e.g. DataLayer.Models) that you put your ApplicationDbContext and ApplicationUser classes in.

However, the whole reason to pull this out of the web applications (for me anyway) to eliminate the dependency of the Entity Framework reference in my web application. Since I'm doing all of my data access in my DataLayer assembly, my web application shouldn't care about entity framework. In your solution above, you make no mention of the steps to fully eliminate this from the web application so it seems like the worst of both worlds.

I'm sure I'll be able to extract all of the code out of the account controller to get this done, it just seems like it would be remiss from your tutorial not to mention this step as well. (just my two cents)
Re: ASP.NET MVC and virtual views
Could u please post the source code of the example
Niklas Re: LINQ CreateDatabase cannot resolve DataDirectory
Thanks a lot for this blog post, very helpful! Weird that it's still not fixed in LINQ to SQL.
Re: jQuery validate and the comma decimal separator
Thanks a lot Lenard!

simple and efective solution :)
Konstantin Re: Moving ASP.NET Identity model into another assembly
What changes did you have to make in the accountcontroller.cs?
Lenard Gunda Re: ASP.NET MVC and virtual views
Hi Mohsen,

Thank you for your feedback! I will try to fit in the time to publish the source code for this article sometime in the future.

Mohsen Re: ASP.NET MVC and virtual views
Hi Lenard
Your articles are great but I can't use them!
Is it possible put sample application with download link in your articles?
Lenard Gunda Re: WSDLMerge v1.2
Sorry but it currently does not support password protected web sites. I'll add that to my list of things to do. I currently have very little time to develope the app and that effort is put into fixing issues with wsdl:import element.

Although this should not be hard to implement (you are referring to simple HTTP username/password, right?)
Lenard Gunda Re: ASP.NET MVC and virtual views
Hi Anthony,

I don't think you should use my approach of virtual views to create dynamic menus for users.

You are talking about menus, so I assume you have a repeating list of elements, maybe on multiple levels (sub-menus). I would recommend doing only one view to display your menu structure.

What I would then do in the model or controller, is filter the list based on the role of the user. Maybe even load only those elements (from the datastore) which the current user has rights to.

By including this kind of logic in your Views, you are going against the Model-View-Controller pattern. Your view should be dumb - just display the things it gets. Simple if statements are acceptable or things that affect how things look ("is this a green button or a blue button").

But doing conditional logic that affects WHAT is displayed is something I would leave to the Model itself. The Menu view should already get a filtered list of the items to be displayed.
Lenard Gunda Re: jQuery validate and the comma decimal separator
Andrew, this is an old article. I think I looked at some sort of Globalization support back when I originally wrote it, but did not find it good enough / mature enough. Two years is a long time, I am glad to see better support is now available! Thanks for the contribution. I like how you wrapped the original validators.

I still think this should be wrapped into a plugin or something, so you could just drop it in, and you wouldn't have to manually start registering new validators with globalization support.

andrucci Re: WSDLMerge v1.2
What's about password protected web address (https://localhost/test.svc?WSDL)?