c#,asp.net,iisRelated issues-Collection of common programming errors


  • Robbie Dee
    c# inheritance
    Knowing that C# doesn’t support multiple inheritance, is it considered bad form to write a utility base class?Some initial thoughts:I could create an interface and a concretion, but then the implementation isn’t portable Should the developer need to extend the class in say, a decorator pattern, they could implement this new class and inherit the base class in their new classEDIT:N.B. I’m not talking about vanilla inheritance here e.g. poodle<–dog<–mammal<–animalMore this sort of thin

  • p.s.w.g
    c# coding-style coding-standards teamwork
    I have one one software system which allows developers to specify an ID or name to create NodeReferences. Both work fine, but ID’s are not guaranteed to be the same across different environments. I’ve tried in documentation and in conversations to stress that ID’s should not be hard coded (since they will break when deployed to a different environments), but some developers are still using them. This works only in dev environment:var level = LevelReference.ById(20); var node = NodeReference.ByNa

  • Andrei
    c# .net git debugging
    When our application doesn’t work the way we expect it to (e.g. throws exceptions etc.), I usually insert a lot of debug code at certain points in the application in order to get a better overview of what exactly is going on, what the values for certain objects are, to better trace where this error is triggered from. Then I send a new installer to the user(s) that are having the problem and if the problem is triggered again I look at the logs and see what they say.But I don’t want all this debug

  • Ismail Gunes
    mysql c#
    I use this query for loading sql data from my pc to localhost mysql database.(version 5.0.10 working witj XAMPP)The query is as below:cmd = new MySqlCommand(“LOAD DATA LOCAL INFILE ‘” + filename + “‘ IGNORE INTO TABLE ” + tblname + ” CHARACTER SET UTF8″, conn);And I tried this also (enclosed tblname) cmd = new MySqlCommand(“LOAD DATA LOCAL INFILE ‘” + filename + “‘ INTO TABLE `” + tblname + “` CHARACTER SET UTF8”, conn);And one line of my sql data (loaded without problem by phpmyadmin) :INSERT I

  • Max Vernon
    c# oracle
    I have an Oracle server running on Windows Server. When an INSERT statement runs I receive an Oracle Ora-00603 error. The insert statement just tries to insert a BLOB into a table. I searched the error specification on Google and found that perhaps there are network connection issues. The suggested action is to log in again to Oracle Server. I followed this tip, however I still receive the same error.The error I receive is the following:ora-00603: ORACLE server session terminated by fatal error

  • MikroDel
    c# refactoring unit-testing wcf
    I have WCF Service. Its work fine and I want to have test coverage for it. Unit tests and acceptance. The problem is static class using in the code. How is it possible to avoid it?If it will be refactored to the code without static classes – I can use mocks for example Moq.I have also used Ninject as DI Framework so far.[ServiceContract]public interface IWorkingService{[OperationContract]Collection<Ergebnis> UpdateEntity(int entityID);}public class WorkingService : IWorkingService{private

  • Jamal
    c# networking socket tcp
    I’ve only been coding C# a few weeks and was just hoping for a little constructive criticism of a socket server I’ve been working on:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net.Sockets; using System.Net;namespace NetworkCommunication {public class TCPSocketServer : IDisposable{private int portNumber;private int connectionsLimit;private Socket connectionSocket;private List<StateObject> connectedClients = new List<StateObject>(

  • kmp
    c# .net
    I saw this question “Is this implementation of an Asynchronous TCP/UDP Server correct” and it is very similar to what I want to do but it goes about it in a different way so I am wondering if anyone would mind doing some constructive critism on my method please.I’m looking for any feedback along the lines of “when x happens your server will fall over because of y” or something like that.My intention is that the server should log out errors that happen and raise an event when it has data. I wan

  • tesicg
    c#
    The code I want to refactor look as following:public bool CheckPay(Int64 orderID) {vpc_OrderInfo = orderID;RequestParams =string.Format(“vpc_Version={0}&vpc_Command={1}&vpc_AccessCode={2}&vpc_MerchTxnRef={3}&vpc_Merchant={4}&vpc_User={5}&vpc_Password={6}”,vpc_Version, vpc_Command, vpc_AccessCode, vpc_MerchTxnRef, vpc_Merchant, vpc_User, vpc_Password);string[] response = SendRequest(vpc_VirtualPaymentClientURL, RequestParams).Split(‘&’);bool ResponseCode = false;bool e

  • Jamal
    c#
    I have two quite mutually exclusive desires – detailed logs and keeping my code clean. It appears that you can only get either of these. By “logging” I mean logging and not tracing, so AOP adepts wouldn’t appreciate it.What I want to have is real description of action my program does, why it does these actions and so forth. For instance, ‘failures’ could either be real failures like ‘fatal errors’, or absolutely normal behavior depending on context: I don’t like to check whether or not file exis

  • jpsnow72
    windows-server-2008-r2 iis7 asp.net roles server-manager
    I am attempting to install IIS7 “Application DevelopmentASP” role via the Server Manager’s “Add Role Services” wizard. Some of the roles include ASP.Net, .Net Extensibility, ASP, ISAPI Extensions, etc. I have now successfully installed other roles under the Application Development heading. ASP is the only issue When attempting to install these I receive the following error for each service that I attempt to install: Attempt to install <the service name> failed with error code 0x8007064

  • Saigework
    database asp.net oracle exception-handling asynchronous-programming
    I have a product with two separate applications. The core of the product lives in the database (oracle) and runs according to a schedule. The other is a client application (currently ASP.NET MVC3) used to manage the database application. There are three levels of validation going on; client, server-side, and database before the client data is saved to the database. However, there are cases where pieces of the data set are currently valid but could become invalid at some point in the future. I

  • user3085540
    c# mysql asp.net mysql-error-1064
    I got the following error while calling a stored procedure in asp.net c#page. I could not understand the error details. Please help me to solve this.MySqlCommand cmd =new MySqlCommand(“CALL sp_wrt_test(10, @param);SELECT @param”, connection);cmd.CommandTimeout = 5000000;//Assign the query using CommandType7 using (IDataReader reader = cmd.ExecuteReader()) {if (reader.Read())id = “@param = ” + reader[0]; }create procedure sp_wrt_test(in name varchar(100), out retval varchar(200)) begininsert into

  • Chad
    asp.net sql-server iis-6 sql-server-2000 asp.net-3.5
    I’ve got a number of ASP.Net websites (.Net v3.5) running on a server with a SQL 2000 database backend. For several months, I’ve been receiving seemingly random InvalidOperationExceptions with the message “Internal connection fatal error”. Sometimes there’s a few days in between, while other times there are multiple errors per day.The exception is not limited to one site in particular, though they share business and data access assemblies. The error seems to always be thrown from SqlClient.TdsPa

  • Mark Cidade
    asp.net debugging iis
    I’ve a a customer using IIS and an application, developed by us, in Asp.NET 1.1. Monday, for 4 times in a row the error “A process serving application pool ‘xxxx’ suffered a fatal communication error with the World Wide Web Publishing Service. The process id was ‘yyyy’. The data field contains the error number.” appeared.Any idea about how to diagnose this? The only link I’ve found talks about installing low level debug tools but before proceeding in this kind of low level analysis I would know

  • Sharpeye500
    c# asp.net mysql
    MySql.Data.MySqlClient.MySqlException:Fatal error encountered during commandexecution. —>MySql.Data.MySqlClient.MySqlException:Timeout expired. The timeout periodelapsed prior to completion of theoperation or the server is notresponding. atMySql.Data.MySqlClient.MySqlDataReader.NextResult()atMySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehaviorbehavior) — End of inner exceptionstack traceWhat does this error mean? I have max connection pool =200 in the connection string? my app i

  • C Sharper
    c# asp.net nhibernate mapping
    i have an error ( System.InvalidCastException: Unable to cast object of type ‘AccountProxy’ to type ‘System.String’.) when i did this codei mapped the tables( Account,AccountString,EventData,…) of the the database opengts ( open source) i have this error when i called a function from EventData.csIQuery query = session.CreateQuery(“FROM Eventdata”);IList pets = query.List();return pets;the Stack Trace:[InvalidCastException: Impossible d’effectuer un cast d’un objet de type ‘AccountProxy’ en typ

  • Tapas Bose
    c# asp.net nhibernate spring.net mapping-resources
    I am new in .NET. I have used Spring Framework and Hibernate before in Java, but this is my first in .NET. To develop my application I am using Spring.Northwind solution as example. The hibernate mapping is:<hibernate-mapping xmlns=”urn:nhibernate-mapping-2.2″><class name=”EMSApplication.Domain.Employee, EMSApplication.Domain” table=”ems_Employees” proxy=”EMSApplication.Domain.IEmployee, EMSApplication.Domain” lazy=”true”><id name=”Id” type=”System.Int32″><column name=”Id” n

  • 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

  • TimothyP
    windows-server-2008 php iis drupal web-platform-installer
    I installed multiple drupal 7 sites using the Web Platform Installer on Windows Server 2008.Until know they worked without any problems, but recently internal server error 500 started to show up (once every so many requests), now it happens for all requests to any of the php sites.There’s not much detail to go on, and nothing changed between the time when it was working and now (well nothing I know of anyway)The log file is flooded with messages such as[09-Aug-2011 09:08:04] PHP Fatal error: Al

  • Metalik
    php iis dcom com hmailserver
    There is an IIS 7 webserver and PHP 5.3I have set com.allow_dcom = true on php.ini file and restarted the webserver.I need to use hmailserver by:$obBaseApp = new COM(“hMailServer.Application”);It says:Fatal error: Class ‘COM’ not found in C:\inetpub\wwwroot\test.php online 22

  • Thomas Pornin
    cryptography ssl iis
    In SSL if the handshake is not succesful, does it always end with a handshake alert? Or are there other ways to finish the SSL connection (acceptable by standard). I am asking this, because in an HTTPS server configured to require client authentication, if the client does not send a certificate, I see (via network packets) a TLS Finished message from server to client; I was expecting an alert.

  • kiamlaluno
    installation 8 iis
    I am trying to install Drupal 8 on IIS 7. When I run Drupal for the first time, I get an error.PHP Fatal error: Call to a member function get() on a non-object in C:\inetpub\wwwroot\drupal\core\lib\Drupal.php on line 275 The code causing the error is the following one./*** Retrieves a configuration object.** This is the main entry point to the configuration API. Calling* @code \Drupal::config(‘book.admin’) @endcode will return a configuration* object in which the book module can store its admin

  • JeanValjean
    php iis fatal-error iis-8 windows-server-2012
    I just upgraded my PHP version after reinstalling the server. A code which worked previously doesn’t work anymore. It tells me about a fatal error.Fatal error: in J:\web\intranet\dologin.php on line 40I checked the lines near that (39-41 are included below) and I can’t see anything which could be wrong.$query = $connection->prepare(“SELECT COUNT(*) FROM users WHERE user = ? AND password = ?”); $query->execute(array($user, $password));$result = $query->fetch();I’m running PHP 5.4.9 on Wi

  • Mark Cidade
    asp.net debugging iis
    I’ve a a customer using IIS and an application, developed by us, in Asp.NET 1.1. Monday, for 4 times in a row the error “A process serving application pool ‘xxxx’ suffered a fatal communication error with the World Wide Web Publishing Service. The process id was ‘yyyy’. The data field contains the error number.” appeared.Any idea about how to diagnose this? The only link I’ve found talks about installing low level debug tools but before proceeding in this kind of low level analysis I would know

  • Leeish
    iis coldfusion coldfusion-10
    Currently I am debugging a seemingly random error with our applications. I will attempt to try to provide as much detail as possible. Basically after a while, one of the application pools for an application on our server stops. I have to start it, or sometimes, restart Coldfusion or worse the machine to get things running again.The Server logs indicate the pool was stopped because of the Rapid Fail Succession thing in IIS. (The App serves X number of errors in a short amount of time so IIS stops

  • Umamaheswaran
    c# wcf iis msmq
    I have a WCF service which will fetch messages from MSMQ and inserts data from that message to a database, it was working well until i received a message of size 9 KB and more. I have debugged and found that the messages are reaching the msmq but it is getting vanished from the msmq without get processed by my WCF Service. I have set the values of the readerQuota to maximum still i’m getting the same issueAdded This issue is not appearing in my dev server while processing the same message, it ap

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

  • zorlack
    .net windows security iis rabbitmq
    I’d like to have an ASP.NET application write to a message queue using RabbitMQ’s native client. To do this I’ve put the RabbitMQ dll in the /bin directory of my web application, and created an .aspx test page.When I test the script I get the following exception System.Security.SecurityException: Request for the permission of type ‘System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.Looking into the problem furthe

Web site is in building