asp.net,javascript,image,validation,file-uploadRelated issues-Collection of common programming errors


  • ell
    asp.net mono monodevelop dblinq xsp2
    I am trying to try DBLinq with the sqlite provider inside a simple ASP.NET web service. I am also using MonoDevelop 2.4 and Mono 2.6.7, The project in monodevelop references the DbLinq.dll which by default is set to be Local Copy. I can compile the webservice just fine. By when I try to run it from Monodevelop or using the xsp2 from the command line, xsp2 fails with a number of errors (see below). If I unchecked the Local Copy for the DBLinq.dll reference, xsp2 will execute but the Li

  • John Adams
    asp.net web-services coldfusion sax
    We are a small team with one ASP.NET web developer and one ColdFusion developer. Neither of us knows the other’s environment. I wrote an ASMX webservice using Visual Studio 2005 and a web application project in Visual Studio 2008 that successfully consumes the web service. But now we are trying to have my ColdFusion colleague consume the webservice and we are getting results we cannot interpret (except to surmise that the target webservice is not even being reached but that some “system layer” u

  • Bradley Lederholz Leatherwood
    asp.net razor mono nginx fastcgi
    Hello so I have been trying to get my website to run on mono (on ubuntu server) and I have followed these tutorials almost to the letter:However when my directory is not blank fastcgi logs reveal this: Notice Beginning to receive records on connection.Error Failed to process connection. Reason: Exception has been thrown by the target of an invocation.I am not really sure what this means, and depending on what I do I can get another error that tells me the resource cannot be found:The resource

  • Sabre
    c# asp.net .net internet-explorer
    I have a MVC web application that uses the 2010 report viewer. written in C# VS2010IE11 users are having difficulty loading the page containing the control, it sits indefinitely on the “Loading…” indicator.I have managed to track this down to others having similar issues with the user agent being the culprit.So to test I pulled up the development tools, changed the user agent to anything other than default, and viola, page loaded without issue.So all of the typical ways to address this such as

  • sshackles
    asp.net c#-4.0 active-directory ldap
    I have created a login page in asp.net using c# but I am having difficulty trying to only allow a certain group to have access. Right now I am accessing everyone but I can’t seem to just filter the group that I need so only those person(s) can have access to my application.Any help would be great so I can just permission this application out to that one group within Active Directory.Here is my class that I am using to pass the groups:public class LdapAuthentication {private string _path;private

  • 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

  • novicePrgrmr
    java javascript ajax json jsp
    I am sorry to ask this but i’ve been working on this for hours and I can’t figure it out on my own. I have to use json for part of a project and I was able to get it to work but now it’s not returning it back to the right jsp but instead just displaying the json jsp. I am pretty sure it is how I am receiving the json.here are screen shots of what is happening:this is the jsp that I need to use ajax on, I am wanting to populate the second dropdown using ajax:this is what is happening instead, (it

  • Andrew Whitaker
    javascript regex
    I am trying to build a regexp from static text plus a variable in javascript. Obviously I am missing something very basic, see comments in code below. Help is very much appreciated:var test_string = “goodweather”;// One regexp we just set: var regexp1 = /goodweather/;// The other regexp we built from a variable + static text: var regexp_part = “good”; var regexp2 = “\/” + regexp_part + “weather\/”;// These alerts now show the 2 regexp are completely identical: alert (regexp1); alert (regexp2);/

  • DOTang
    javascript regex
    I am searching for text inside of website resources (html and javascript), and need to identify 3 regular expressions that will locate this text under certain circumstances:some string of text when it is contained inside of a javascript single-quoted string some string of text when it is contained inside of a javascript double-quoted string some string of text when it is not contained inside of a javascript stringHere are some scenarios that are likely to occur (searching for the string “somestr

  • Andy E
    javascript html
    I’m building up a row to insert in a table using jQuery by creating a html string, i.e.var row = “”; row += “<tr>”; row += “<td>Name</td>”; row += “<td><input value='”+data.name+”‘/></td>”; row += “</tr>”;data.name is a string returned from an ajax call which could contain any characters. If it contains a single quote, ‘, it will break the HTML by defining the end of the attribute value. How can I ensure that the string is rendered correctly in the brow

  • sameer
    javascript angularjs maven yeoman
    I have recently integrated maven yeoman plugin with my app. I followed https://github.com/trecloux/yeoman-maven-plugin/blob/master/TUTORIAL.md My angular version is v1.2.3 . When I run the mvn clean install command, I get the following error . [email protected] node_modules\grunt-contrib-imagemin ?ö£?öÇ?öÇ [email protected] ?ö£?öÇ?öÇ [email protected] ([email protected], [email protected]) ?ö£?öÇ?öÇ [email protected] ([email protected]) ?ö£?öÇ?öÇ [email protected] ([email protected]) ?ö£?öÇ?öÇ p

  • Ronald Yeung
    javascript jquery ajax json cors
    What I am trying to do is to have a page on the HTTP protocol sending an AJAX call to the same Web server but using HTTPS. Both the requesting page and the AJAX handler are on the same server, having the same domain and port. (I.e., only difference is the protocol.) To illustrate,Fromhttp://www.example.com/index.phpTriggers a jQuery AJAX call tohttps://www.example.com/authenticate.php?user=123&password=456(I am hoping to pass the password through HTTPS to make it encrypted over the Internet.

  • stanleyhope
    javascript ajax ssl internet-explorer-8
    The problem: I have a site with a recently installed SSL certificate that is very dependent on POST calls over AJAX. The site worked fine on Internet Explorer 8 before the SSL certificate, but now does not.Since I haven’t been able to get a good way to read any error messages, I haven’t been able to pin down where the bug is coming from. I will try to list as much as I know/ have figured out, and I greatly appreciate any suggestions.What I know:On IE8, the site will not perform any AJAX POST cal

  • Mac-Gon
    javascript jquery html5 css3 navigation
    I’ve been reading lots of the other posts, and no doubt it’s my inexperience with jQuery that is giving me trouble, but there are lots of things close to what I’m trying to accomplish. I have a div where I have a vertical navigation set of buttons. Inside that I want the other divs (child divs) that will be shown or hidden based on the navigation button clicked by the user. I want all of these divs to be in the same location on the screen…so, basically like a tabbed form but with vertical navi

  • user2520224
    java javascript file comparison
    QUESTION : Is there a better way to compare two low size(100Kb) files, while selectively ignoring a certain portion of text. and report differencesLooking for default/existing java libraries or any windows native appsBelow is scenario: Expected file 1 located at D:\expected\FileA_61613.txt ..Actual file 2 located at D:\actuals\FileA_61613.txtContent in expected File Some first line hereThere may be whitespaces, line breaks, indentation and here is another lineKey : SomeValue Date

  • Liam Bailey
    javascript jquery history.js
    On this page: http://www.kastenreus.nl/onze-kasten/ we have the filters down the left hand side, we are having a problem with the link filters under Verfijn uw wensen, if you watch the console you can see it is firing 2 requests, the first one is what the content is loading in from, when it is the second we actually need.This is the click binded event:jQuery(“.codenegar_product_filter_wrap ul li a”).live(“click”, function(e){e.preventDefault();var $this = jQuery(this);if($this.attr(“data-key”) =

  • Tim
    android image
    I have used this code so that I can be upload an image from gallery into my application. But the problem is I get force to close error when my application try to open gallery. Please help me because I don’t know how to solve this errorprivate static final int SELECT_PICTURE = 1;private String selectedImagePath; private ImageView img; public void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState); setContentView(R.layout.main); img = (ImageView)findViewById(R.id.imageVie

  • ultranaut
    php image gd blend multiplying
    I want to blend two images – like multiply, overlay and other blend modes – in PHP with GD library.My images = Image1.jpg — imageblend.jpg or image3.png Please help me write examples or step by step teach me? I’ve found some examples but they don’t work.

  • MLM
    php image .htaccess mod-rewrite
    I am trying to use adaptive images and I have no problem using it with normal linked images that end in .jpg, .png, .gif but when I use a filesystem that a php file grabs a unextensioned file from a directory and uses header Content-Disposition: inline to display the image, the htaccess does not properly run it through the php file.Here is the Rewrite rule that works for normal linked images:RewriteRule \.(?:jpe?g|gif|png)$ adaptive-images.php [NC,L]Here is an example of a image link that needs

  • Pheonix7
    android image post logcat
    im making a register page where one puts an email address, a password and takes a picture. i need to send these 3 parameters through a POST request to a server. What should the data type be of the image? File, OutputStrem? or something else? Im also getting a System.err error. saying:01-28 13:52:19.214: I/RegisterActivity(27106): path1 : /storage/emulated/0/MyCameraApp 01-28 13:52:19.221: W/System.err(27106): java.io.FileNotFoundException: /storage/emulated/0/MyCameraApp/1390913539226.jpg: open

  • Ben Curtis
    android image service camera
    I’m working on an Open Source device manager, but having an issue with one security feature that allows users to take pictures from the camera if the phone is stolen. Everything works great in the Emulator, but on a Nexus 4 running Android 4.3.1, I get the following error (including the debug printouts):12-20 10:05:28.083: D/HelperService(22358): HERE012-20 10:05:28.354: D/HelperService(22358): HEREA12-20 10:05:28.354: D/HelperService(22358): HEREB12-20 10:05:28.374: D/HelperService(22358): HERE

  • MyWay
    android image listview android-sqlite
    I want to save to db some strings with image. Image can be taken from gallery or user can set the sample one. In the other activity I have a listview which should present the rows with image and name. I’m facing so long this problem. It occurs when I wanna display listview with the image from gallery, If the sample image is saved in the row everything works ok. My problem is similar to this one: how to save image taken from camera and show it to listview – crashes with “IllegalStateExcepti

  • Ruhi
    android image parse.com
    I am able to load image gallery and display image in Imageview. I need to save the image which user selects in parse.com as blackened. Its a picturepath that I am able to load using BitmapFactory. I have created a column in data browser with field as File. I have also gone through the tutorials on Parse.com and implemented each step. But its not working when click on save button. App is crashing each time.My Code is :public class LoadImg extends Activity { private static int RESULT_LOAD_IMAGE =

  • ArtemStorozhuk
    android image gallery folder
    I’m trying to show images in the specific folder using default Android Gallery. I found only one sample code to do this. I have simplified that code and now it’s much clear:public class ScanActivity extends Activity implements MediaScannerConnectionClient {private static final String SCAN_DIR = Environment.getExternalStorageDirectory() + File.separator + “MyFolder” + File.separator;private static final String FILE_TYPE=”image/*”;private String scanPath;private MediaScannerConnection conn;@Overri

  • Lohit
    android image bitmapfactory
    After many tries of reducing the image size, I could actually succeed; but still my app is failing to work after I try to view an image which I have shrink ed. Here is the code for that -package com.example.tg_db1;import java.io.File;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import android.app.Activity;import android.content.Intent;import android.database.Cursor;import android.graphics.Bitmap;import android.graphics.BitmapFactory;import andro

  • mKorbel
    java image swing jpanel paintcomponent
    I’m experimenting with graphics in Java, creating a domino game. However, I have run into another mysterious little “challenge”… I think I really ticked off the IDE this time Anyway here is my code:// In the main class import java.awt.Color; import javax.swing.JFrame; public class GameBoard extends JFrame {public static void main(String[] args) {JFrame game = new JFrame();game.setTitle(“Domino”);game.setSize(800, 600);game.setDefaultCloseOperation(EXIT_ON_CLOSE);game.setBackground(Color.GREEN

  • poke
    c# wpf validation mvvm
    Warning: Very long and detailed post.Okay, validation in WPF when using MVVM. I’ve read many things now, looked at many SO questions, and tried many approaches, but everything feels somewhat hacky at some point and I’m really not sure how to do it the right wayT.Ideally, I want to have all validation happen in the view model using IDataErrorInfo; so that’s what I did. There are however different aspects that make this solution be not a complete solution for the whole validation topic.The situati

  • Tayba
    validation spring-mvc
    i try to add validation in Spring MVC project, but when i add the jar: validation-api-1.0.0.GA.jari get this error creating bean exception org.springframework.beans.factory.BeanCreationExceptionorg.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0’: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with na

  • chills42

  • meder
    php database validation forms
    I’m trying to validate the password entered by the user with the password in the database. I’ve worked out that it checks the username fine (if the username doesn’t exist it displays an error), however when it tries to validate the password with the mysql password it never works. The working ‘example’ is at http://scapersclearing.com/fansite/login.php; and this is the PHP (note base.php contains the database information and header.php, navigation.php and footer.php and all front-end). I’m planni

  • DRapp
    wpf validation c#-4.0 datatrigger
    I’ve looked around, but can’t specifically find my issue. I know that the default “Error” handling within WPF puts an “Adorner” around controls in case there are any errors based on IDataErrorInfo or Validataion rules failing a given control. That’s all good and fine, however, with a tabbed page interface, if any controls are so flagged as invalid, they are properly adorned in red border. However, as soon as you go from tab page 1 to 2 and back to 1, all the adorners are gone (bad). This was

  • devdar
    spring validation spring-mvc
    I have a Spring MVC application and i have a Validation class that implements Validator. This validation class is called in the controller using the @InitBinder annotation. This validation occurs before inserting a record into the database however when i want to do an update i would not need all the fields to be validated from this validation class. I insert a record and update using the same view and the view has a controller that handles the insert and update based on HttpRequest.Is there a wa

  • James Meade
    android xml validation xml-schema xerces
    I am trying to validate an XML file against an XML Schema file and I have downloaded the https://code.google.com/p/xerces-for-android/ library to get XML Schema validation to work and I have created the project as a library. I am having trouble getting it to work properly for Android and I get the ‘FileNotFoundException’ error and if anyone can see what I am doing wrong or what I need to do to get it to work, then please can you help me.Here is the code:public void xmlValidator() throws IOExcept

  • capped
    java oop validation constructor
    QuestionHow best can i manage construction of an object graph where complex validation logic is required?. I would like to retain dependency injected, do-nothing constructors for testability reasons.Testability is very important to me, what does your suggestion do to maintain this attribute of the code?BackgroundI have a plain-old-java-object which manages the structure of some business data for me:class Pojo {protected final String p;public Pojo(String p) {this.p = p;} }I want to make sure that

  • Souad
    validation spring-mvc
    In my spring MVC application, i want to validate a form inputs where i have int values so I create this method inside the controller for converting values in the form from String to int :@InitBinder public void binder(HttpServletRequest request, ServletRequestDataBinder binder)throws Exception {binder.registerCustomEditor(Inspection.class, new CustomNumberEditor(int.class, false)); }the properties in Inspection.class are of type int, and when I send an empty form to see error messages I get this

  • 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.

  • Christophe_Dumonet
    spring file-upload multipart
    I got a form belonging to a web app that contains a “file” field to upload a pdf file.( spring 3 environment, multipart file upload) Uploading file works fine in test environnement (all browsers), and only works with Firefox in production environment (file upload cause connection reset exception with low internet connection client browser especially) The following exception is thrown a few seconds after submit button is pressed : ( browser is IE/Chrome running in windows environment but not Fire

  • mF4d
    php codeigniter file-upload
    for the past hour I’ve been cracking up to solve this problem. I’m quite new to Codeigniter.I made a page that will upload certain file types. It works fine in my local development but not in production. It won’t pass the do_upload() function. Nothing is displayed beyond that.$path = ‘uploads’; echo ‘path: ‘. $path .’ <br>’; //– config for uplaod — $configUpdload[‘upload_path’] = $path ; $configUpdload[‘allowed_types’] = ‘gif|jpg|png|xls|xlsx|pdf’; $configUpdload[‘max_size’] = ‘4000’

  • user2626445
    java php android file-upload
    I am calling uploadFile on item clicked.gridView.setOnItemClickListener(new OnItemClickListener() {@Overridepublic void onItemClick(AdapterView<?> parent, View v,int position, long id) {ImageItem item = (ImageItem) parent.getAdapter().getItem(position);Toast.makeText(MainActivity.this,item.getAddress(),Toast.LENGTH_LONG).show();uploadFile(item.getAddress());}});Here is the method UploadFile which does uploadingpublic void uploadFile(String sourceFileUri) {String fileName = sourceFileUri;Pr

  • InnocentKiller
    android video file-upload
    I am trying to upload video file to server when recording of video get finished. I am setting video.mp4 as default file name of video while starting recording and storing inside SD-card. After recording get finished on button click event i am renaming video name and trying to upload it to my server. But unfortunately i am getting error. My app is not stopping unfortunately or anything but when i check on server video file is not getting updated, in logcat i got below error.01-29 12:52:41.116: E/

  • InnocentKiller
    java php android audio file-upload
    I am trying to upload audio file to server when recording of audio get finished. I am setting audio.mp3 as default file name of audio while starting recording and storing inside SD-card. After recording get finished on button click event i am renaming audio name and trying to upload it to my server.But unfortunately i am getting error. My app is stopping unfortunately, in logcat i got below error. 01-30 15:08:58.452: E/Debug(1686): error: /storage/sdcard/filetoupload/1391074738276.mp3: open fail

  • vjy
    java spring file-upload
    I have a Spring application where user uploads big files (more than 300 mb). In local, it’s working perfectly fine. However, when I try to use my application in Live, most of the time it fails (some times it gets succeed though). Here is the log from console. Can anyone help me to how to get rid of the error. I am using JQuery Chunk file upload functionality. Server is Tomcat 6.17:02:28,395 DEBUG SessionFactoryUtils:793 – Closing Hibernate Session File Path:/home/borneind/ty/uploads/7397758850/2

  • Tiny dragons tail
    android file-upload multipart retrofit
    In my project, I’ve got to send an image taken from android device to server site, where it should be stored on disk. Unfortunatelly, when I call the method on the device site I meet this error::26:26.995: DEBUG/Retrofit(4429): java.lang.RuntimeException: Unable to write multipart request.at retrofit.mime.MultipartTypedOutput.buildPart(MultipartTypedOutput.java:86)at retrofit.mime.MultipartTypedOutput.addPart(MultipartTypedOutput.java:49)at retrofit.RequestBuilder.setArguments(RequestBuilder.j

  • sandeep
    android audio file-upload audio-recording android-mediarecorder
    I am trying to upload audio file to server when recording get finished. I have set CurrentDate and Time as audio file name as you can see that in below code.private String getFilename() {String filepath = Environment.getExternalStorageDirectory().getPath();File file = new File(filepath, AUDIO_RECORDER_FOLDER);SimpleDateFormat sdfDate = new SimpleDateFormat(“dd-MMM-yyyy hh-mm-ss”);String currentDateandTime = sdfDate.format(new Date());if (!file.exists()) {file.mkdirs();}return (file.getAbsolutePa

  • Maksim
    java file-upload httpclient pandastream
    I’m building Java client that will automatically upload file from Java server to Panda Instance that I installed on my EC2 cloud using their AMI. I’m trying to use Apache HTTP Components to upload to Panda Server (Panda Stream). It works fine with my browser client but for some reason I can’t upload from that library. Here is my code:String videoUploadUrl = “http://[panda server ip]/videos/” + getVideoID() + “/upload.xml”; File file = new File(“/temp/videofile.mp4”);DefaultHttpClient httpclient

  • Japs
    java spring file-upload multiple-files
    We have been using ExtJS widget ‘multiple file upload’ to upload many files at a time. Everything goes fine on UI side but when we are getting error in Spring’s action. I would like to know that how to retrieve row POST data in Java? UI: ExtJSController: @RequestMapping(value = “views/upload.action”, method = RequestMethod.POST) public @ResponseBody String create(FileUploadBean uploadItem, BindingResult result) throws IOException{ExtJSFormResult extjsFormResult = new ExtJSFormResult();File file

Web site is in building