Click here to Skip to main content
15,890,186 members

Mouadh TRABELSI - Professional Profile



Summary

    Blog RSS
149
Authority
5
Debator
21
Enquirer
346
Organiser
829
Participant
0
Author
0
Editor
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
QuestionASP.NET MVC - Views location Problem : The view 'Index' or its master was not found Pin
Mouadh TRABELSI27-Apr-10 0:41
Mouadh TRABELSI27-Apr-10 0:41 
Hi all,

I've create an asp.net MVC 2 project, it works fine!!

I've been asked to integrate the project in an existing web project in classic asp.net

(I've add the folder containing the source, and not make a new project, because they have to bee in same project)

I've configured my web.config file


<pages pageBaseType="System.Web.UI.Page" >
      <controls>
        <add tagPrefix="asp"
             namespace="System.Web.UI"
             assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add tagPrefix="asp"
             namespace="System.Web.UI.WebControls"
             assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </controls>
      <namespaces>
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="System.Linq" />
        <add namespace="System.Collections.Generic" />
        <add namespace="SearchApp.Helpers.CheckBoxList"/>
        <add namespace="SearchApp.Helpers.Pager"/>
      </namespaces>
    </pages>

    <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"  />
    </httpModules>
    <!--- END MVC config section-->


and my global.asax file (I'm working under IIS 5.1) :

public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");            
            
            routes.MapRoute(
                "SearchApp", // Route name
                "SearchApp/{controller}.aspx/{action}/{id}", // URL with parameters
                new { controller = "Search", action = "Index", id = "" } // Parameter defaults
            );
        }

protected void Application_Start(Object sender, EventArgs e)
{
            AreaRegistration.RegisterAllAreas();

            RegisterRoutes(RouteTable.Routes);
}

The hierarchy of the project is (I can’t find how to insert Image in the post):

+Project

++MVC2AppFolder
+++Controller
++++SearchController.cs
+++Views
++++Search
+++++Index.aspx

++global.asax
++web.config

as you can see the global.asax is not in the MVC App folder

when I try to access the page Search/index.aspx using this url http://localhost/cstfwsrv/SearchApp/Search.aspx/Index[^]

I have the following error :

The view 'Index' or its master was not found. The following locations were searched:
~/Views/Search/Index.aspx
~/Views/Search/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: The view 'Index' or its master was not found. The following locations were searched:
~/Views/Search/Index.aspx
~/Views/Search/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[InvalidOperationException: The view 'Index' or its master was not found. The following locations were searched:
~/Views/Search/Index.aspx
~/Views/Search/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx]
   System.Web.Mvc.ViewResult.FindView(ControllerContext context) +253553
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +139
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +10
   System.Web.Mvc.<>c__DisplayClass14.<InvokeActionResultWithFilters>b__11() +20
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +251
   System.Web.Mvc.<>c__DisplayClass16.<InvokeActionResultWithFilters>b__13() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +178
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +314
   System.Web.Mvc.Controller.ExecuteCore() +105
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +39
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__4() +34
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +59
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +44
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +7
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8677678
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155


As you can see he search for the Index.aspx page under ~/Views/Search/Index.aspx , wich is under ~/MVC2AppFolder/Views/Search/Index.aspx

Is there a way to set in the Route Method, or any where else, the View Path?


Thanks’ in advance
mouadh trabelsi

QuestionWeb Application stress : "Failed to load the perf counters from the computer " Pin
Mouadh TRABELSI3-Mar-09 21:50
Mouadh TRABELSI3-Mar-09 21:50 
GeneralWS problem:Unable to connect to the remote server Pin
Mouadh TRABELSI29-Jan-07 2:12
Mouadh TRABELSI29-Jan-07 2:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.