asp.net,asp.net-mvc,search,jqgrid,jqgrid-asp.netRelated issues-Collection of common programming errors
Jon
asp.net sql-server-2005 database-connection
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)Hello I am new on developing on SQL Server 2005. I’ve worked for several years with SQL Server 2000, but after doing the usual stuff I do to connect to the server I get this exception on the
user2668128
c# asp.net .net asp.net-web-api
I have created a basic ASP.NET Web Api Application inside VS Express 2013 using all of the defaults. I added a controller and it returns XML just as I want.As soon as I install the CORS package:Install-Package Microsoft.AspNet.WebApi.Cors -PreI can’t even run the application anymore:An exception of type ‘System.IO.FileLoadException’ occurred in mscorlib.dll and wasn’t handled before a managed/native boundaryAdditional information: Could not load file or assembly ‘System.Web.Http, Version=5.0.0.0
Mtblewis
php asp.net wordpress authentication single-sign-on
I am attempting to create a single sign on experience between an asp.net site and a wordpress site using a simple form POST method. I have built a simple php page that uses the native wordpress functions wp_insert_user and wp_signon to create user account in the mysql db and sign them in. In my asp.net ‘create new user’ page code behind, I’m using the post method of an HttpWebRequest to send the required information to the php page. It almost works! The new wordpress user is created in the mysql
Mr Moo
asp.net asp.net-mvc sql-server-2008 nhibernate ninject
We have an ASP.Net 4 / MVC 3 hybrid web application which uses NInject 3 and (Fluent) NHibernate 3.2. DB is SQL Server 2008 R2. Server is 6-core 28 GB Windows 2008 64-bit server.Our customer has recently started testing the site using a spidering tool. As soon as the site experiences the load produced by the spider, our log starts to fill up with exceptions. We see a variety of errors from NHibernate, including some of the following:NHibernate.TransactionException: Commit failed with SQL excep
Joel Hansen
c# asp.net asp.net-mvc ravendb
Why can’t I make an embedded RavenDB work in a fresh asp.net MVC website?I have successfully tried and tested the following code in a simple .net console application. It works just fine, until I try and use it in an MVC website.It doesn’t throw any error, it just hangs after attempting to Initialize()In my bug-finding process, I installed a RavenDB server on localhost, which I can connect to in my MVC application – that is not a problem. But the initialize error was there before I installed the
Bryan
asp.net security
I am working on an application for which requires the following functionality: The user clicks a button on the web page and this causes a document to be printed without any further user intervention.The approach I am using to deliver this functionality is to embed a Windows Control (using a Windows Control Library) in the web-page. (A tutorial on doing this is available here.) I worked through a similar tutorial and the Windows Control was properly created and displayed.The next step was to try
daniel
c# asp.net ldap iis-7.5
I replaced our domain name with “demo”… please ignore missing commas and such in the image below. My question is as follows:I want to authenticate the SBSUsers in my ASP.NET web application. I cannot figure out what my active directory path needs to be in order to get it to work…When I set it as follows, it fails to authenticate (I assume because my users are not under that path)… but it doesn’t give me an error:string adPath = “LDAP://ac-dc01.demo.local:389/CN=Configuration,DC=demo,DC=loc
Prisoner ZERO
javascript asp.net curljs
Good day, I’m experimenting with CurlJS and have been successful with most items. However, for some reason I still cannot load a CSS file using CurlJS.Firebug (net tab) shows their css.js plugin as being loaded: which I assume is used to load CSS files. Firebug (console tab) shows ‘a.load is not a function’ coming from within the curl.js file.Version Number for define.amd.curl is: “0.6.2”My question is: Why isn’t the CSS file getting loaded?MY CODE LOOKS LIKE:<html xmlns=”http://www.w3.org/
jocull
asp.net windows-server-2008 32bit-64bit
I am working on a project that requires a C library that I have wrapped with managed code. The C library is compiled for 32-bit and I’ve figured out that it requires msvcr71.dll. Problem is that this DLL does not come stock with Windows Server 2008 in the SysWOW64 directory for whatever reason.I’ve copied the DLL from SQL Management Studio on the system, and I can verify that it works in a standalone EXE on the server. There is nothing preventing it from working.HOWEVER… when I link it into my
Jared Updike
c# asp.net visual-studio web-services iis
I’m using a native DLL (FastImage.dll) in a C# ASP.NET Web Service that sometimes locks (can’t delete it—says access denied); this requires stopping IIS to delete the DLL. The inability to delete this DLL in the bin folder of my published Web Service prevents me from publishing successfully (even though it thinks it published successfully!), which makes development and fixing the bug difficult (especially when it just happily runs old code since my changes may not be reflected on the server!).
amurra
asp.net-mvc asp.net-mvc-4
I have the need to manually instansiate some controllers and therefore have this code:var controller = Activator.CreateInstance(typeof(AccountController), repository) as AccountController;In the AccountController I have a method similar to this:[AllowAnonymous] [HttpPost] public ApiJsonResult LogOn(LogOnAccountDto model) {ValidateModel(model);if (ModelState.IsValid){//…} }I want my ModelState.IsValid to work, so therefore I call ValidateModel and pass it the model.This fails, apparently becaus
H.B.
asp.net-mvc html5
I am trying to set up a lightweight HTML5 Server-Sent Event implementation on my MVC 4 Web, without using one of the libraries available to implement sockets and similars. The lightweight approach I am trying is:Client side: EventSource (or jquery.eventsource for IE)Server side: long polling with AsynchController (sorry for dropping here the raw test code but just to give an idea)public class HTML5testAsyncController : AsyncController{private static int curIdx = 0;private static BlockingCollect
Mr Moo
asp.net asp.net-mvc sql-server-2008 nhibernate ninject
We have an ASP.Net 4 / MVC 3 hybrid web application which uses NInject 3 and (Fluent) NHibernate 3.2. DB is SQL Server 2008 R2. Server is 6-core 28 GB Windows 2008 64-bit server.Our customer has recently started testing the site using a spidering tool. As soon as the site experiences the load produced by the spider, our log starts to fill up with exceptions. We see a variety of errors from NHibernate, including some of the following:NHibernate.TransactionException: Commit failed with SQL excep
Benjamin
c# asp.net-mvc model-view-controller active-directory
I have an issue using c# on .Net 4 in a MVC web application, where when I query Active Directory, I frequently get an error: Attempted to access an unloaded appdomain. (Exception from HRESULT: 0x80131014).The strange thing is, that it will work flawlessly for a time, and then it will just start happening, and then just disappear again.I have made a few modifications to the function to get it to work , but they all seem to fail. I am wondering if I am doing something wrong, or if there is a bette
CR41G14
c# .net asp.net-mvc asp.net-mvc-4 gzip
Hi what I am trying to achieve is to compress an uploaded file and save this into the database then to decompress on download. I am using C# .NET MVC4.The system does deliver a file available to download, however when I try to open this file it is corrupt. This code works perfectly fine locally, there are no exceptions being thrown on the server and I do get a so I was wondering if anyone has had any issues with GZip on the server? I have had the server guys take a look and they have deemed
Joel Hansen
c# asp.net asp.net-mvc ravendb
Why can’t I make an embedded RavenDB work in a fresh asp.net MVC website?I have successfully tried and tested the following code in a simple .net console application. It works just fine, until I try and use it in an MVC website.It doesn’t throw any error, it just hangs after attempting to Initialize()In my bug-finding process, I installed a RavenDB server on localhost, which I can connect to in my MVC application – that is not a problem. But the initialize error was there before I installed the
Gohar
javascript asp.net-mvc validation datetime validator
I have a Custom Attribute for DateTime validation with given dateformat and also javascript validator which are provide me both client side and server side validation. But now I should change my datetime validation so that it would be performed according clients local DateTime format and I do not know how.I couldn’t find anything that help me.So please advise me how can I implement at least client side DateTime validation or how can I get client’s date format by javascript.
Jon Erickson
asp.net-mvc structuremap godaddy
I am getting a SecurityException (as seen below), even with [assembly: AllowPartiallyTrustedCallers] in my AssemblyInfo.cs.I am deploying to GoDaddy, which is a medium trust environment, which I don’t think StructureMap is set up to run under natively, although the 2.5.3 release notes mention adding the AllowPartiallyTrustedCallers attribute on the assembly level, it doesn’t seem to correct the issue.Is there a code example or something that will point me in the right direction? What am I missin
dazedsnowboarder
c# android asp.net-mvc asp.net-mvc-4
I’m a first time poster so please excuse my ignorance on posting technique. I have been searching for hours and cannot seem to find the answer to this so hopefully the smarter people in the room can help? I have a web application written in .net MVC 4 that connects to several cloud service APIs. The user can then download files from this web app. I’ve been able to get this to work on all platforms except android. When I try to download the file on Android it hangs and eventually fails. While dow
Jim
asp.net asp.net-mvc asp.net-mvc-3 asynchronous
I have a ASP.NET MVC3 application that handles time-consuming processes (copying a large file from network). What we want to do is:User clicks a button to post the form to trigger the process Application starts a new thread to start copying the file Application shows a message saying the file-copying process has begun User can close the browser while the copying processed and finished in the background.The idea is that the user doesn’t need any confirmation on the progress of the process, nor be
Sunil
android search
I did the first part of this tutorial…http://developer.android.com/training/search/setup.htmlI made the options_menu.xml and added the code to the onCreateOptionsMenu() method. After I run my app on my device it turns on and automatically crashes. Sorry I don’t know if I formatted the LogCat message below properly but I copy / pasted into here so it may help determine what the problem is, I’m not sure how to read it or fix the issue. Let me know if I can format it more properly or maybe export
Aymon Fournier
java android xml search
I am trying to implement my own Search using searchable, and as soon as press return after entering a query into my custom search field, I get a RuntimeException:Thread [<1> main] (Suspended (exception RuntimeException)) ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2585 ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2679 ActivityThread.access$2300(ActivityThread, ActivityThread$ActivityRecord, Intent) line: 125
HemChe
java api search twitter timeout
I am running this program to search for tweets. Getting the below exception pasted.Could any one help me what the problem is?please let me know if any other details required.Thankspublic class KrishsSearchTweets {public static void main(String[] args) {try {Twitter twitter = new TwitterFactory().getInstance();// My Applications Consumer and Auth Access Tokentwitter.setOAuthConsumer(“key”, “secret”);twitter.setOAuthAccessToken(new AccessToken(“token”, “secret”));System.out.println(“Search Progra
amit
php algorithm search search-engine information-retrieval
I want to make a searching option for my site, and for fun I decided I should at least try to make it myself (If I fail, there’s always Google Custom Search).The problem is, I don’t even know how to approach this monster! Here are the requirements:Not all keywords will be required in the search (Should one search for “Big happy world”, it would also search for “Big world” “happy world” etc) Common spelling mistakes considerations (from a database, via edit difference or a predefined list of comm
jrthib
search solr nutch
I’ve been trying various things with no avail. My configuration of Nutch/Solr is based on this:http://ubuntuforums.org/showthread.php?t=1532230Now that I have Nutch and Solr up and running, I would like to use Solr to index the crawl data. Nutch successfully crawls the domain I specified but fails when I run the command to communicate that data to Solr. Here’s the command:bin/nutch solrindex http://solr:8181/solr/ crawl/crawldb crawl/linkdb crawl/segments/*Here’s the output:Indexer: starting at
kaiser
custom-post-types search
The default WordPress search setup isn’t really working for my website’s setup.I have two custom post types (species, glossary) which I’d like to search for, as well as the standard post type.The species post type (which I’ll refer to herein as species profiles) is made up of a number of meta fields, including genus and species (two taxonomic ranks which are used to commonly identify species of fish). The title of a species profile is its scientific name (Genus species) and any non-scientific co
syb0rg
java algorithm strings search file
I have written this code to search for a string in a .txt file. Is it possible to optimize the code so that it searches for the string in fastest manner possible? Assuming the text file would be a large one (500MB-1GB)I don’t want to use regex.import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException;public class StringFinder {public static void main(String[] args) {double count = 0,countBuffer=0,countLine=0;String lineNumber = “”;
Greg Chetcuti
bash search replace
Answer #1: I ended up starting from scratch, and I was able to piece something together that works! Might not be the most efficient, but it does the job.#!/bin/bash for file in *.php do #Check to see if the filename contains any uppercase charactersiscap=`echo $file | awk ‘{if ($0 ~ /[[:upper:]]/) print }’`if [[ -n $iscap ]]then #If the filename contains upper case characters convert them to lower casenewname=`echo $file | tr ‘[A-Z]’ ‘[a-z]’` #make lower case #Perform various search/replaces on
mark
web-services search pagination
I have some results obtained through WS requests from a couple of different providers, then i gather and order the results and i show them at the user.The number of the results is somewhere between 0 and 60-70, with an average of 10-20. My problem is: how to handle pagination? I’m trying to figure out which is the best solution for my situation, because i have find out several ways to do that… and I am sure I am missing other good (probably better) solutions… The solutions i thought until n
linuxnoob
linux search hyperlink download webpage
I am trying to write a linux script to search for a link on a web page and download the file from that link…the webpage is: http://ocram.github.io/picons/downloads.htmlThe link I am interested in is: “hd.reflection-black.7z”The original way I was doing this was using these commands..lynx -dump -listonly http://ocram.github.io/picons/downloads.html &> output1.txt cat output1.txt | grep “17” &> output2.txt cut -b 1-6 –complement output2.txt &> output3.txt wget -i output3.tx
WildBill
jquery jqgrid
I know how to use the search feature on JQGrid where you send the request back to the server each time a filter or search is performed. Doing so if you code the php correctly you can perform a LIKE search on the data in the column. For example, if a column contains the string Hello World and you search on world you will get a match. Yet if you use the loadonce option with jqGrid not only will world fail to return a match but hello will as well.Is there a way to do this natively with the loado
Oleg
jquery jqgrid jsonp geojson jsonreader
I’m trying to read and post in a jqGrid a set of earthquakes GeoJSON data extracted from USGS repository. The request is accepted, but displays “Uncaught SyntaxError: Unexpected token” when probably meets the header metadata.$(function () {‘use strict’;$.extend($.jgrid.search, {multipleSearch: true, multipleGroup: true, overlay: 0});$(‘#grid’).jqGrid({url: ‘http://earthquake.usgs.gov/earthquakes/feed/geojson/2.5/week?callback=?’,datatype: ‘json’,colModel: [{name: ‘mag’, label: ‘MAGNITUDO’, width
iabbott
c# linq jqgrid
Preparing data for jqGrid I get an unexpected array of cells for the subgrid. The simplified code looks like:var result = new {total = 1,page = 1,records = qstList.Count(),rows = qstList.Select(( c, i ) => new{Id = c.QuestionId,Text = c.Text,Type = c.Type,Points = c.Points,Ordinal = c.Ordinal,subgrid = new{subtotal = 1,subpage = 1,cell = qstList.Where(q => q.QuestionId == c.QuestionId).Select(q => q.Answers).Select((d, j) => new{Id = d.Select(a => a.AnswerId),Text = d.Select(a =&
Alicia
jquery asp.net-mvc-4 jqgrid
JQGrid is not displaying an error in the form when submitting incorrect data. It works on my local machine but not in production. It used to work in prod but I’ve made a couple of changes in the last couple of months and am not sure which change broke it. I am using JQGrid 4.4.1, jquery 1.7.2 and MVC 4. The error in the browser is showing the followingUncaught SyntaxError: Unexpected token < jquery%20-1.7.2.min.js:3 e.extend.parseJSON jquery%20-1.7.2.min.js:3 editItems.errorTextFormat WaterRe
Fung
json jqgrid
I am getting a JSON.parse: unexpected character exception while I am trying to read a local JSON in my JQGrid. <script type=”text/javascript”>var jsondata = { “totalpages”: “1”, “currpage”: “1”,”totalrecords”: “2”,”invdata” : [{“name”:”New York City”, “country”:”USA”, “continent”:”NorthAmerica”},{“name”:”Paris”, “country”:”France”, “continent”:”Europe”}]};$(document).ready(function() { $(“#grid”).jqGrid({ data: jsondata,datatype: “json”,colNames: [“Name”, “Country”, “Continent”],colModel:
user2067567
jquery jqgrid
Am working on JQGrid and i got this doubt on how to implement.Currently am displaying standard set of results to user every time as given in examples.colNames:[‘Inv No no NO’,’Date’, ‘Client’, ‘Total in EUR’]Suppose if am changing this result set i will change in .js file (add or remove column) of JqGrid.Is there a any way i can bring these Column names from Table and Bind it to JqGrid ?Also how do i ADDcolumn names at runtime ? like adding new Column and all.Thanks
Peter Mortensen
javascript jquery css jquery-ui jqgrid
I want to change the CSS of the add form of the jqGrid. Are there any methods available for changing the complete CSS in the linking of the add form for the jqGrid?I want to import another CSS file for the add form and apply for that add form.
user398247
jqgrid jqgrid-asp.net
I’ve tried with limited success to get dynamic columns to work with jqGrid. Limited in that I can control the column names and formatting from the controller. But when I do this I can’t get the data in.Do you have a small sample solution that shows the controller code for the two calls.
user1624552
javascript jquery asp.net-mvc-4 jqgrid
I am using jqGrid in my asp.net mvc4 project and in one of my view I have the following:<table id=”_componentGrid” cellpadding=”0″ cellspacing=”0″> </table> <div id=”_componentPager” style=”text-align: center;”> </div>and I have a javascript file that begins like this:function showGrid() {$(‘#_componentGrid’).jqGrid({caption: paramFromView.Caption,….in runtime an error is generated:The object does not accept the property or method ‘jqGrid’.How to solve this?
Andrus
asp.net-mvc jqgrid toolbar
How to change jqgrid button tooltip texts at runtime? The following code in Site.Master does not change them, static tooltip texts tooltips are still read only from grid.locale-xx.js file. How to change them in Site.Master ?<script type=”text/javascript”>$.jgrid.no_legacy_api = true;jQuery.extend(jQuery.jgrid.defaults, {addtitle: ‘Add new row new tooltip’, deltitle: ‘delete button new tooltio’, edittitle: ‘<%= Res.I(“Muuda rida”)+” (F4)” %>’, });
user398247
jqgrid jqgrid-asp.net
I’ve tried with limited success to get dynamic columns to work with jqGrid. Limited in that I can control the column names and formatting from the controller. But when I do this I can’t get the data in.Do you have a small sample solution that shows the controller code for the two calls.
chrisp_68
jqgrid jqgrid-asp.net server-error
I am trialing jqgrid.net mvc and have noticed that any server error that happens in an add or edit popup dialog, ends up rendering the entire error page in the popup, which is not very pretty. Does anyone know if it is possible to handle this better and perhaps just put a brief message in the dialog instead, a bit like the way validation errors are handled.
Pouya
jquery jqgrid jqgrid-asp.net jqgrid-formatter
i’m starter in jqgrid. i write this code for load jqgrid data and create some icon Button for show custom panel papup for insert and update. $(function () {$(“#txtFullName”).autocomplete({source: function (request, response) {$.ajax({url: “AutoCompleteHandler.ashx”,dataType: “json”,data: {term: request.term,Person: 1},contentType: “application/json”,converters: {“json json”: function (msg) {return msg.hasOwnProperty(‘d’) ? msg.d : msg;}},success: function (data) {response($.map(data, function (i
kmk
javascript jqgrid jqgrid-asp.net
I’m using jqGrid (4.3.1) in an ASP.NET MVC 3 web application.I have a unique situation (at least, one I can’t find a solution for) in that I’m being supplied my data from an outside source – in paged fragments – so I cannot use the url property of the grid, yet I still must implement server side sorting, paging, & filtering.my plan is (once i resolve the below) to use the onPaging, onSortCol, and beginSearch methods to call back to the web service and refresh the grid data in the callback.Th
roothsmz
asp.net-mvc-2 jqgrid-asp.net
I’m using asp.net mvc to create a webpage that renders a jqGrid for data in my azure table. The grid will callback into my controller and using the debugger, I can visually verify data is being generated correctly. The issue is that once the data is returned as a JSON string, the jqGrid throws this error:b.jgrid.getAccessor(p, d.cell) is undefined http://localhost:54758/jquery.jqGrid.min.js Line 65I’ve looked online for documentation but have been unsuccessful in returning anything except what a
Ovi
search jqgrid autocomplete jqgrid-asp.net
After reviewing these 2 questions and Oleg great answers can jqgrid support dropdowns in the toolbar filter fieldsjqGrid toolbar search with autocomplete using json dataI am trying to implement this feature with autocomplete of jQgrid toolbar search with json data coming form the server.My code:myGrid.jqGrid({url: ‘./WebService.asmx/ViewNQueryData’,datatype: ‘json’,mtype: ‘POST’,ajaxGridOptions: { contentType: ‘application/json; charset=utf-8’ },serializeGridData: function (postData) {if (postDa
harish
jqgrid jqgrid-asp.net
1) I have data of matrix stored in table as below table: MatrixDimensions – MatrixId, NoOfRows, NoOfCol MatrixValues – MatrixId, RowNo, ColNo, ValueHow can i make jqgrid to take no of rows & columns dynamically and also display the serialized data in matrix.Is there a direct way or i will have to implement for loops to upload the data in matrix?2) can I display rows as columns and columns as rows (so having column headers vertically aligned)3) can I enable only inline editing and disable for
Eric Brown – Cal
jquery asp.net-mvc jqgrid jqgrid-asp.net jsonserializer
We are using a JQgrid in an asp.net MVC application…The Jqgrids are as designed doing the time zone offsets on all date times displayed within…we want to display the server time instead (non modified for timezone)I found this answer: jqgrid is displaying different datetime based on time zoneswhich tells me to use a custom formatter to reformate the MS style datetime to a noew format using the Json Serializer..here is my grid definitiofunction InitJqGridMon() {startUrl = ‘@Url.Action(“GetClas
Josh
jquery jqgrid jqgrid-asp.net
I’ve got a jqGrid along with a jquery UI button toolbar. My toolbar consists of View & Edit Mode. In my jqGrid onSelectRow I check edit mode with method isInEditMode. This returns true if the button with ui-active-state is edit button.My grid seems loads correctly, and hover classes turn on/off as a drag my mouse over the rows. If I’m not in edit mode and click a row it does other functionality, which is correct. But when isInEditMode returns true it only seems to allow onSelectRow to fire O
polonskyg
jqgrid asp.net-web-api jqgrid-asp.net jqgrid-php
I can’t make the upload work using (ajaxFileUpload ) but I can’t make it work. I’m following this post but the UploadImage function is not being called. I mean, seems that afterSubmit event is not being fired.Any ideas why?jQuery(“#ajaxGrid”).jqGrid({url: $(“#ServiceUrl”).val(),datatype: “json”,jsonReader: { repeatitems: false, id: “Id” },colNames: [‘Id’, ‘logoTarjeta’],colModel: [{ name: ‘Id’, index: ‘id’, editable: false, sortable: true, hidden: true, align: ‘left’ },{name: ‘FileToUpload’, ind
Web site is in building