joeharrison714 / MVCGrid.Net

http://mvcgrid.net
MIT License
74 stars 55 forks source link

NuGet installation doesn't appear to work #18

Open divtag opened 9 years ago

divtag commented 9 years ago

I've installed MVCGrid via NuGet and although it has added the DLL and a reference to it, none of the other setup appears to have worked and I have had to perform a manual install to complete the installation.

This appears to have left my setup broken though, because although I have managed to get a grid to load, when I click on the page buttons I get a JavaScript error, saying "JavaScript runtime error: 'MVCGrid' is undefined", and the following line is highlighted: <li><a href='#' onclick='MVCGrid.setPage("AgreementSearch", 2); return false;'>2</a></li>

Have I done something wrong or am I missing a file or two?

Thanks. Paul.

joeharrison714 commented 9 years ago

Hi Paul, Can you help me with debugging this? I just did a test and the nuget install is working in VS 2013 with NuGet 2.8.5. Can you let me know what versions you are using?

In the meantime you can use the manual instructions here: http://mvcgrid.net/gettingstarted Make sure you have the line in your web.config in step 5 Thanks, Joe

divtag commented 9 years ago

Hi Joe,

I'm using VS 2010 with nuget 2.8.6.

I followed the instructions for the manual install, having to add all of the folders and classes manually; I updated the web.config file as mentioned, but I don't seem to have the 'MVCGridHandler.axd' file anywhere.

Any help would be much appreciated.

Cheers, Paul.

joeharrison714 commented 9 years ago

Paul, The MVCGridHandler is part of the dll. When you add this line:

<system.webServer>
    <handlers>
      <add name="MVCGridHandler" verb="*" path="MVCGridHandler.axd" type="MVCGrid.Web.MVCGridHandler, MVCGrid" />
    </handlers>
  </system.webServer>

The type section is telling it to look int eh MVCGrid assembly. Can you try hitting your url /MVCGridHandler.axd and see what it returns?

Thanks, Joe

divtag commented 9 years ago

I get "The resource cannot be found." HTTP 404.

It's a bit bizarre as I can drill down using the object browser and see the function. :(

joeharrison714 commented 9 years ago

are you using IIS6 by any chance?

joeharrison714 commented 9 years ago

try adding this instead to your web.config

  <system.web>
    <httpHandlers>
      <add verb="*" path="MVCGridHandler.axd" 
        type="MVCGrid.Web.MVCGridHandler, MVCGrid" />
    </httpHandlers>
  </system.web>
divtag commented 9 years ago

Hi Joe,

I get the same results when running on either the ASP.Net development sever on my local machine or our Dev web server which is running IIS 7.5.

I've tried amending the web.config as you've suggested and still get the same issue with the grid not allowing any interaction (although I do get a grid with data!).

When I navigate to /MVCGridHandler.axd I now get:

Server Error in '/' Application.

Value cannot be null.
Parameter name: name 
  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.ArgumentNullException: Value cannot be null.
Parameter name: name

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: 

[ArgumentNullException: Value cannot be null.
Parameter name: name]
   MVCGrid.Web.MVCGridDefinitionTable.GetDefinitionInterface(String name) +107
   MVCGrid.Web.MVCGridHandler.HandleTable(HttpContext context) +119
   MVCGrid.Web.MVCGridHandler.ProcessRequest(HttpContext context) +492
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249 
rajasanjeevkumar commented 8 years ago

Hi,

   Is there a solution to this problem? I faced the same trail of issues and got stuck at the last issue.

Thanks, Raja

shefaliA commented 8 years ago

It worked for me.I used below command -

Install-Package MVCGrid.Net

Regards, Shefali Agrawal [773-666-3273]

On Wed, Aug 3, 2016 at 1:17 PM, rajasanjeevkumar notifications@github.com wrote:

Hi,

Is there a solution to this problem? I faced the same trail of issues and got stuck at the last issue.

Thanks, Raja

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/joeharrison714/MVCGrid.Net/issues/18#issuecomment-237322351, or mute the thread https://github.com/notifications/unsubscribe-auth/ATBD42m64KnyiFvbBuHFv5SB2zv1T9RKks5qcNs3gaJpZM4FGXQq .

AnujMcFarland commented 6 years ago

I know this is old and perhaps the solution found. I had the same issue. I removed mvcgridhandler from bundleconfig and used @Scripts.Render("~/MVCGridHandler.axd/script.js") also added it before jqueryVal