Articles : Page 1 of 1

  • Wishful Thinking: Why can't HTML fix Script Attacks at the Source?

    Wishful Thinking: Why can't HTML fix Script Attacks at the Source?

    Apr 12
    15

    The Web can be an evil place, especially if you're a Web Developer blissfully unaware of Cross Site Script Attacks (XSS). Even if you are aware of XSS in all of its insidious forms, it's extremely complex to deal with all the issues if you're taking user input and you're actually allowing users to post raw HTML into an application. I'm dealing with this again today in a Web application where legacy data contains raw HTML that has to be displayed and users ask for the ability to use raw HTML as...


  • Getting a Web Resource Url in non WebForms Applications

    Getting a Web Resource Url in non WebForms Applications

    Oct 11
    05

    WebResources in ASP.NET are pretty useful feature. WebResources are resources that are embedded into a .NET assembly and can be loaded from the assembly via a special resource URL. WebForms includes a method on the ClientScriptManager (Page.ClientScript) and the ScriptManager object to retrieve URLs to these resources. For example you can do: ClientScript.GetWebResourceUrl(typeof(ControlResources), ControlResources.JQUERY_SCRIPT_RESOURCE); GetWebResourceUrl requires a type (which is use...


  • June 26th Links: ASP.NET, ASP.NET MVC, .NET and NuGet

    June 26th Links: ASP.NET, ASP.NET MVC, .NET and NuGet

    Jun 11
    27

    Here is the latest in my link-listing series. Also check out my Best of 2010 Summary for links to 100+ other posts I’ve done in the last year. [I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu] ASP.NET Introducing new ASP.NET Universal Providers: Great post from Scott Hanselman on the new System.Web.Providers we are working on. This release delivers new ASP.NET Membership, Role Management, Session, Profile providers that work with SQL Ser...


  • Bin Deploying ASP.NET MVC 3

    Bin Deploying ASP.NET MVC 3

    May 11
    26

    When you build an ASP.NET MVC 3 application and are ready to deploy it to your hosting provider, there are a set of assemblies you’ll need to include with your application for it to run properly, unless they are already installed in the Global Assembly Cache (GAC) on the server. In previous versions of ASP.NET MVC, this set of assemblies was rather small. In fact, it was only one assembly, System.Web.Mvc.dll, though in the case of ASP.NET MVC 1.0, if you didn’t have SP1 of .NET 3.5 installed...


  • IntelliSense for Razor Hosting in non-Web Applications

    IntelliSense for Razor Hosting in non-Web Applications

    Jan 11
    12

    When I posted my Razor Hosting article a couple of weeks ago I got a number of questions on how to get IntelliSense to work inside of Visual Studio while editing your templates. The answer to this question is mainly dependent on how Visual Studio recognizes assemblies, so a little background is required. If you open a template just on its own as a standalone file by clicking on it say in Explorer, Visual Studio will open up with the template in the editor, but you won’t get any IntelliSense...


  • Integrating ASP.NET MVC 3 into existing upgraded ASP.NET 4 Web Forms applications

    Integrating ASP.NET MVC 3 into existing upgraded ASP.NET 4 Web Forms applications

    Jan 11
    06

    I got an interesting question recently from a gentleman who has an existing ASP.NET WebForms 2.0 application that works just fine. He's upgraded it to ASP.NET 4 and it still works great, but now he wants to add some ASP.NET MVC pages to it. He doesn't want to rewrite the application. A few years ago I did a post on Hybrid ASP.NET applications. The goal was to reinforce the point that you can have ASP.NET applications that are both WebForms and MVC (as well as WCF and ASMX Web Services and o...


  • Hosting the Razor Engine for Templating in Non-Web Applications

    Hosting the Razor Engine for Templating in Non-Web Applications

    Dec 10
    28

    Microsoft’s new Razor HTML Rendering Engine that is currently shipping with ASP.NET MVC previews can be used outside of ASP.NET. Razor is an alternative view engine that can be used instead of the ASP.NET Page engine that currently works with ASP.NET WebForms and MVC. It provides a simpler and more readable markup syntax and is much more light weight in terms of functionality than the full blown WebForms Page engine, focusing only on features that are more along the lines of a pure view engine...


  • BIN Deploying ASP.NET MVC 3 with Razor to a Windows Server without MVC installed

    BIN Deploying ASP.NET MVC 3 with Razor to a Windows Server without MVC installed

    Nov 10
    24

    If someone says just bin Deploy it they mean deploy the application with the dependencies copied into the application's /bin folder, rather than running an MSI that installs the dependencies into the Global Assembly Cache (GAC). You may not have administrative control over your Web Server and your host may not want you running installers when new stuff like ASP.NET MVC 3 and Razor comes out. You'll want to bin deploy these new technologies. Here's two ways. The simple way and The Awesome...



  • 1