asp.net,vb.net,jsonRelated issues-Collection of common programming errors


  • systempuntoout
    asp.net gmail smtpclient
    I’m working against a GoogleApps account for sending event notifications from my (mvc) web-app. Usually everything works fine. When the system is asked to send more than 75 messages or so I’m seeing replies from the SMTP server:Service not available, closingtransmission channel. The serverresponse was: 4.7.0 Try again later,closing connection. (MAIL)uf10sm1153163icb.17However, the system is auto-retrying and anything my system is asked to send eventually (by everything i can tell as this point)

  • Rex M
    .net asp.net 64bit
    Given a .NET 3.5 programming and client-use environment with Windows Vista. What are the implications for programming for a 64 bit OS under the below circumstances? Please specify whether there are issues of functionality or optimization – i.e. will it work and can it be made to work better in 64-bit environment.1) You are developing a web app (asp.net c#)2) You are developing a win forms business app (nothing driver level)3) You are developing a hardware controllerI would have thought there a

  • ThomasWeiss
    asp.net iis
    My goal is to call a native DLL via P/Invoke from an ASP.NET application. So far, I can successfully call the DLL from a Console app, or even from an OWIN server running on HttpListener, hosted in an Azure WorkerRole.Troubles arise when I try to host the exact same code in ASP.NET/IIS, either in a simple ASP.NET app or in an Azure WebRole. In such a context, the call to the DLL throws an AccessViolationException.From my research, it looks like the issue could come from the fact that the native D

  • doctorlove
    c# asp.net .net moles
    We are using Moles framework (0.94.5) to write unit test cases but not able to either debug or run the test cases. System: Win7 64bitMoles: 0.94.5 64bit with VS 2010 proThe solution build successfully. But while trying to run test cases we are getting the following error. { Error 9/6/2013 3:35:32 PMSystem.InvalidOperationException : Could not start Moles host. Please review the Test Run Errors for more information. //errorat Microsoft.Moles.VsHost.Agent.HostTestAdapterDriver.EnsureHostAdapter

  • marc_s
    asp.net sql-server-2008
    I am new to development and want to know the professional way to deal with dates in SQL Server. In my applications mainly we deal with the DATE datatype and no concern with time part. Also maintaining the format dd/mm/yyyySo for example if I have the table with the following structure.EmployeeTable ————— emp_id int emp_name varchar(50) join_date date and if I want to query “join_date” in between start date and end date and pass the dd/mm/yyyy as stored procedure criteria and wan

  • JNPW
    asp.net .net
    I have aspx pages which uses repetative code. So i put them on a masterfile and referring that in all other files. I have used the in all other pages where i included master page like, <asp:Content ID=”Step1Content” ContentPlaceHolderID=”MainContent” Runat=”Server”>My issue is now all the field id’s has a suffix of ContentPlaceHolderID_fieldName and because of this my javascript doesnt work.<input id=’chkRaces_1′ type=’checkbox’ runat=’server’ onclick=”enableShow50();” /><label f

  • John M
    c# asp.net terminal-services
    On a intranet ASP .NET (C#) page I am trying to retrieve the current username.From my local machine (Firefox 3.5) I can see results (from my local login) for the following possibilities:<% Response.Write(User.Identity.Name); %> <% Response.Write(HttpContext.Current.User.Identity.Name); %> <% Response.Write(Page.User.Identity.Name); %>However when I browse locally(IE8) or on the server (IE7) none of the above work for my terminal server login. Is this a permission issue between

  • Stu1986C
    c# asp.net asp.net-mvc azure
    I get an System.Xml.XmlException: Root element is missing down in the code, at the line var user = await UserManager.FindAsync(model.UserName, model.Password); Obviously it is a MVC 5 AccountController unmodified from the template. It worked flawlessly local before I deployed to Azure, where I had some problems. Because of that I tried to check everything locally again, with the result of the Exception, that haunts me. Has anyone an idea what I am missing?// POST: /Account/Login[HttpPost][A

  • 8bitcat
    asp.net linq code-structure
    I’m pretty new to ASP.NET and I think im not using it they way it’s meant to be used with all the features packed into the latest .NET framework. I’m currently using .NET framework 4,0. There are some error in the code, don’t mind them mind they way I seem to be using ancient techniques.I have structured everything like this.I file called webservice.cs, that file is packed with webmethods like this:[WebMethod] public string laggtillprodukt(string pro1, int pro2) {int sqlstatus;string sqlinsertst

  • Iulian
    c# asp.net excel datatable npoi
    I have an asp.net website that will generate some excel files with 7-8 sheets of data. The best solution so far seems to be NPOI, this can create excel files without installing excel on the server, and has a nice API simillar to the excel interop.However i can’t find a way to dump an entire datatable in excel similar to CopyFromRecordsetAny tips on how to do that , or a better solution than NPOI ?

  • w0051977
    c++ vb.net pinvoke
    I am new to using PInvoke with Classic C++ and I asked this question yesterday: Using Windows API functions in .NETI have now created a very simple C++ program as follows:#include <iostream> #include <stdio.h> #include <string> extern “C” __declspec(dllexport) int hello() {//printf (“Hello World!\n”);return 1; } I then compiled the DLL using the following command: g++ -c mydll.cpp Then created the shared library using the following command: g++ -shared -o mydll.dll mydll.o, the

  • Raphael Smit
    .net vb.net openfiledialog
    I have noticed OpenFileDialog failing to show all files in a directory, this happens in my application but also other windows native programs such as Task Manager “New Task” “Browse” option (which uses the OpenFileDialog Control), does anyone know the reason and possible workarounds for that? Even running Task Manager as admin didn’t fix it so its not caused by privileges it seemsEdit: i now know this was caused by a appcompat feature called File System Redirector apparently i was starting Task

  • HeavenCore
    c# asp.net vb.net imap
    Background: We have an internal intranet system written in asp-classic and asp.net – the iis server doesnt have php installed (Seen some nifty solutions in php such as this but we cant really use these.) – we need to display to our users how many unread email they have in their imap mailbox. Their imap mailbox is hosted internally on a linux box running postfix and dovecot imap.My Question: How would one connect to Postfix mail system via Dovecot Imap in .net (vb or c#) and determine the number

  • Peter Mortensen
    c# .net vb.net 64bit 32-bit
    What are the differences between 32 and 64-bit .NET (4) applications? Often 32-bit applications have problems running on 64-bit machines and conversely. I know I can declare an integer as int32 and int64 (certainly int64 on 32-bit systems make problems). Are there other differences between programming an 32 OR 64-bit or a both 32 AND 64-bit compatible application?

  • GlennFerrieLive
    c# vb.net badimageformatexception
    I get a BadImageFormatException when running a C#/VB SmartClient application with the Any CPU configuration. If I use x86 configuration then it runs fine. This is an old, legacy project which I occasionally have to modify and I don’t know the history, so I can only guess that there are dlls that contain 32-bit native code causing this error. This all makes sense, except that when the configuration is Debug & AnyCPU it runs, only when the configuration is Release & AnyCPU does it fail. I

  • Nikhil Agrawal
    c# vb.net visual-studio
    Is there an option for VB.Net in Visual Studio to directly jump to variable datatype’s after new operator in intellisense list? (Please don’t give Add-in option like Resharper or CodeRush. Plain Native Visual Studio settings would suffice)Scenario I come from C# background and have habit of writing likeApplication a = newAs soon as I press space bar after new operator, the intellisense directly jumps to Application class in the list of intellisense options like this(I understand that this featur

  • zanhtet
    asp.net vb.net crystal-reports reportdocument
    I created a report using report document object model in visual studio 2008 with vb.net. But I found one error. When the user clicks export button in client side, the following error will show. But the first time is OK before the user clicks export button.Logon failed. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for SQL Server Description: Login failed for user ‘zanhtet’. SQL State: 42000 Native Error:This is calling report code.Dim ReportDocument As New ReportDocument()Dim Rep

  • jko
    vb.net api youtube
    Hi i want to create an uploading video program using youtube api I think I missed something. I search for some examples on how to upload using .net but cant seem to find an answer. Heres my code:` Imports Google.YouTubeImports Google.GData.ClientImports Google.GData.ExtensionsImports Google.GData.Extensions.MediaRssImports Google.GData.YouTubeImports Google.GData.Extensions.LocationPublic Class Form1Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But

  • CD Smith
    vb.net asp.net-mvc-3 linq-to-sql .net-4.0
    I’ve read through the posts here and can’t find any eureka answers so here’s what I have. Linq to SQl not propagating a change back to the db.Here’s my code. Does anything stand out? The call to dc.GetChangeSet shows 0 changes. What am I missing? I can see the new values from “setting” being set to the cs object properties. SettingID is a primary key in my table and shows as PK in the dbml so that’s not an issue.Public Shared Function Update(ByVal setting As ClarifireSetup) As BooleanDim cs As

  • Matt
    c# .net sql-server vb.net replication
    I am trying to deploy an application that uses SMO on a workstation without SQL Server installed on it. The instance the app is connecting to is SQL Server 2008. The application is failing with:Could not load file or assembly ‘Microsoft.SqlServer.Replication, Version 10.0.0.0, Culture=neutral, PublicKeyToken=89845cdc8080cc91’ or one of its dependencies. An attempt was made to load a program with an incorrect format.The assembly in question is in the same path as my application as well as syste

  • dystroy
    javascript json parsing
    When I am using below code :{“info”:[{“name”: “Adam”,”address”: “Park Street”}] }It is parsing perfectlybut adding on further code like:{“info”:[{“name”: “Adam”,”address”: “Park Street1″},{ //<—— getting error here”name”: “Bob”,”address”: “Park Street2”},{“name”: “Clarin”,”address”: “Park Street3”}] }I am getting error : Parse error

  • edlizano
    jquery ajax json spring-mvc spring-json
    I’m trying to to make AJAX call with the jQuery library using the $.ajax() method and Json as dataType, the problem comes when I try to apply that to my app in springmvc 2.5, I simply cant find a good tutorial on how to apply that to Spring mvc 2.5, but 3.0Cheersexceptionjavax.servlet.ServletException: Servlet.init() for servlet dispatcher threw exceptionorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)org.apache.catalina.valves.ErrorReportValve.invoke(ErrorR

  • efpies
    java android json jackson
    I’m trying to implement JSON array iterator with Jackson SAX parser (please, don’t ask why). My app should work with huge files (up to 5 MiB), and that’s a problem.That’s how I initialize JsonParser and call iterator creation. I create InputStream initialized with JSON placed in \raw folder.private JsonArrayIterator getIterator(String needle) throws IOException{InputStream inputStream = getApplicationContext().getResources().openRawResource(R.raw.products);inputStream.mark(-1);try {JsonParser js

  • user984621
    ruby-on-rails ruby json bundler
    Today I ran an app that on which I have been working like a half year ago and when I run the command bundle update, I get this error:Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension./Users/adam/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb creating Makefilemake /usr/bin/gcc-4.2 -I. -I/Users/adam/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-darwin10.8.0 -I/Users/adam/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/Users/adam/.rvm/rubies/

  • Marc O. Alfonso
    json restkit restkit-0.20
    I have an API that requires I post a complex JSON object. The API saves and responds with a primitive ID (or an error object). I am not able to map the primitive ID. Any ideas? The example below, for simplicity’s sake, is not doing the POST object mapping, but some of my API calls will require that as well.I saw suggestions to utilize RestKit to build the request, and pass it to AFNetworking, but this will not parse a possible error return object.RKObjectMapping* map = [RKObjectMapping mappingFo

  • Mouhammed Soueidane
    java json cxf jboss7.x
    I’m having a hard time implementing a REST web service using Apache CXF 2.x. I have a strict requirement to use JBoss AS 7.1.1 Final, which comes equipped with CXF 2.4.6. I have installed JBossWS 4.1.1: Apache CXF integration stack which upgrades the CXF version to 2.6.4. I’m using Eclipse Kepler SR1 in which I had to install “JBossAS Tools” so I could set JBoss AS 7.1.1 as my project runtime. The following are the different classes I’m using as well as my web.xml:Web.xml <?xml version=”1.0

  • Daniel Vérité
    json object servlets lifecycle catalina
    I am having the following error in my project when I tried to access JSONObject in my servlet.My servlet code is,package org.java.test;import java.io.IOException; import java.io.PrintWriter;import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject;@WebServlet

  • TinyGrasshopper
    ruby json gem devkit
    I tried to install the json gem on Windows. I installed DevKit. I get the following error below. Any suggestions? This questionJSON Gem will not install (Windows)suggests installing DevKit and also try using json_pure. I did both. The problem is that my bundle install is trying to install json and won’t proceed until json is installed. This is a bundle install for a Rails project btw.d:\source\my_project>gem install json -v ‘1.6.3’ Temporarily enhancing PATH to include DevKit… Building nati

  • ThinkingStiff
    json hadoop amazon-s3 hive emr
    I have data containing the following:{“field1”:{“data1″: 1},”field2″:100,”field3″:”more data1″,”field4”:123.001} {“field1”:{“data2″: 1},”field2″:200,”field3″:”more data2″,”field4”:123.002} {“field1”:{“data3″: 1},”field2″:300,”field3″:”more data3″,”field4”:123.003} {“field1”:{“data4″: 1},”field2″:400,”field3″:”more data4″,”field4”:123.004}I uploaded it to S3 and converted it to a Hive table using the following from the Hive console:ADD JAR s3://elasticmapreduce/samples/hive-ads/libs/jsonserde.jar

  • IHeartAndroid
    json angularjs verify
    When getting a json from a URL I only want to work with it, when the data is valid.my approach so far by using JSON:$http.get(‘data/mydata.json’+ “?rand=” + Math.random() * 10000,{cache: false}).then(function (result) {try {var jsonObject = JSON.parse(JSON.stringify(result.data)); // verify that json is validconsole.log(jsonObject)}catch (e) {console.log(e) // gets called when parse didn’t work}})However before I can do the parsing, angular already fails itselfSyntaxError: Unexpected token {at O

Web site is in building