Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'System.Web.Routing.IRouteHandler' is
not defined.
Source Error:
Line 47: ''' <remarks></remarks>
Line 48: Public Class ProductsRoutesHandler
Line 49: Implements System.Web.Routing.IRouteHandler
Line 50:
Line 51:
But my class is ok, and I can compile it from Visual Studio without any
problem... What can be?
This is my code:
Public Class ProductsRoutesHandler
Implements System.Web.Routing.IRouteHandler
''' <summary>
''' Maps "Products/product/{ProductID}" to "Products/product" with "ID"
in httpcontext("ProductID")
''' </summary>
''' <param name="requestContext"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Function GetHttpHandler(ByVal requestContext As
System.Web.Routing.RequestContext) As System.Web.IHttpHandler Implements
System.Web.Routing.IRouteHandler.GetHttpHandler
Dim productID As String =
requestContext.RouteData.GetRequiredString("ProductID")
Dim virtualPath As String = "~/Products/product.aspx"
System.Web.HttpContext.Current.Items("ProductID") = productID
Return
DirectCast(System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(virtualPath, GetType(Page)), System.Web.IHttpHandler)
End Function
End Class
thanks
As this is new in 3.5 my first thought would be that the web server uses 2.0
rather than 3.5. Have you checked which version is installed in the web
server ? Upgrading is safe as 3.5 is basically 2.0 with new features.
--
Patrice
"Trapulo" <nonscr...@qui.it> a écrit dans le message de
news:2D58791A-D328-4EE7...@microsoft.com...
I would just add to the answer given by Patrice that MSDN says about
"3.5 SP1"
http://msdn.microsoft.com/en-us/library/system.web.routing.iroutehandler.aspx
"Patrice" wrote:
> Hello,
>
> As this is new in 3.5 my first thought would be that the web server uses 2.0
> rather than 3.5. Have you checked which version is installed in the web
> server ? Upgrading is safe as 3.5 is basically 2.0 with new features.
Hello,
I've the trouble developing in VS 2008 SP1, when I run debug using F5. And
this is a new project, but I have a lot of older project that use Routing and
work well :(
Do you see it in the list of References of the project? If not, click
Add Reference and look for 'System.Web.Routing'
Your new project is based on which template ? (one that includes routing ?)
I would search for Routing in the web.config of a project that works and
would search Routing in the web.config of the project that doesn't work.
If you are using the proper framework version then could it be just that the
web.config file doesn't contains the needed entries ?
--
Patrice
"Trapulo" <nonscr...@qui.it> a �crit dans le message de groupe de
discussion : AFE95375-C659-4A9F...@microsoft.com...
"Alexey Smirnov" wrote:
of course.
I solved defining the "copy local=true" attribute to the reference...
However this is really strange: it's first time I need this, and assembly is
right in my GAC :(