Question: I have big trouble deploying my webservice. It is the basic helloWorld start webservice.

At my localhost everything os ok. But when I copy the service to my server in my virtual directory i recieve this error:

> 
> Server Error in '/' Application.
> 
> 
> Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
> 
> 
> Parser Error Message: Could not create type 'Service'.
> 
> 
> Source Error: Line 1: <%@ WebService Language="vb" CodeBehind="~/App\_Code/Service.vb" Class="Service" %>
> 
> 
> Source File: /customers/iv\_webservice/Service.asmx Line: 1
> Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4955
> 
> 
> 

Now I have tried almost everything. Including scanning the web for the past 9 hours for an answer.

I know my virtual directory in the web.config is ok, since I have other virtual websites on my server. I even manage to have aspx. files in the same directory and they are ok.

Now, what am I missing?

Answer: 
I created a helper method for ASP.NET MVC 3 that works like this, inspired by Html.BeginForm:

within the view:

```
@using (Html.BeginHtmlTemplate("templateId"))
{
    <div>enter template here</div>
}

```

Anything within the @using scope will be syntax highlighted.

The code for the helper:

```
public static class HtmlHelperExtensions
{
    public static ScriptTag BeginHtmlTemplate(this HtmlHelper helper,string id)
    {
        return new ScriptTag(helper,"text/html", id);
    }
}

public class ScriptTag : IDisposable
{
    private readonly TextWriter writer;

    private readonly TagBuilder builder;

    public ScriptTag(HtmlHelper helper, string type, string id)
    {
        this.writer = helper.ViewContext.Writer;
        this.builder = new TagBuilder("script");
        this.builder.MergeAttribute("type", type);
        this.builder.MergeAttribute("id", id);
        writer.WriteLine(this.builder.ToString(TagRenderMode.StartTag));
    }

    public void Dispose()
    {
        writer.WriteLine(this.builder.ToString(TagRenderMode.EndTag));
    }
}

```
I don't think you can unless you trick the editor to not know you are writing a script tag, like writing it in code (HTML helper or so). I'd work around it by changing the tag name (or commenting it) temporarily and bringing it back after I'm done. Sure that's a silly solution.

One other thing you can do is instead of using `script` tag, use any other tag like `div` setting it's `style` to `display:none`. It should work exactly the same way (example in middle of [this article](http://stephenwalther.com/blog/archive/2010/11/30/an-introduction-to-jquery-templates.aspx)).