asp.net,visual-studio-2010,c#-4.0Related issues-Collection of common programming errors
utunga
iis windows-7 virtualization asp.net windows-server-2003-r2
here’s the set up I’m trying to go work.Windows 7, with files for an “ASP.NET Web Application” (a new one created by wizard for this test) installed in c:\tfsprojects\test\test this project opens and builds in Visual Studio 2010 just fine. Windows Server 2003, running inside of VMWare Workstation 8. VMWare has a mapping so that the native filesystem c:\tfsprojects appears as \vmware-host\Shared Folders\tfsprojects inside the VM IIS inside of the VM, set up to run a default website on 80 from
NayeemKhan
c# asp.net
Dear all, i have following code to open a file on click of a buttonSystem.Diagnostics.Process.Start(“soffice.exe”,filepath);soffice.exe is to open .odt files & filepath is containing the complete path of the file which i want to open.This is working perfectly when i m executing the code on my local system, but as i m hosting it on the iis server (5.1), its not taking any action (event not throwing any error too). My filepath is accessing a folder in my project, not outside. Kindly suggest th
John Booty
asp.net ipad 3g
We maintain a server-side reporting application for a client. On one reporting page, there are several heavy database calls in the middle of the page, causing the page to take 5-10sec to render.Problem: When accessing the page via an iPad over AT&T 3G, the page successfully loads about 50% of the time. Sometimes, however, Mobile Safari renders the top half of the page and then gives a “Server Connection Was Reset” error.Background information If you switch the iPad from 3G to a solid broadba
Oliver
c# asp.net
I am making a payment system for my site. Users can select one of several payment providers to pay, but all should behave in the same way. I thought to represent this behavior like this:public abstract class PaymentProvider {private static var methods = Dictionary<String,PaymentProvider>{{“paypal”,new PaymentProviderPaypal()},{“worldpay”,new PaymentProviderWorldpay()}}public static Dictionary<String,PaymentProvider> AllPaymentProviders{get {return methods;}}public abstract pay(); }pu
Rudi Visser
asp.net asp.net-mvc asp.net-mvc-2 asp.net-mvc-4
In ASP.NET MVC 2, the lifespan of an entry in the TempDataDictionary was just one HTTP Request.That translated to setting a value in one request, redirecting, and having access to the same item at the other end of the line. After this the entry would be no longer available, regardless of whether you read the value out of the dictionary at the latter end of the line or not.Since ASP.NET MVC 3 (I believe), this implementation detail has changed quite significantly.Entries in the TempDataDictionary
John Leidegren
asp.net
The ASP.NET runtime is meant for short work loads that can be run in parallel. I need to be able to schedule periodic events and background tasks that may or may not run for much longer periods.Given the above I have the following problems to deal with:The AppDomain can shutdown due to changes (Web.config, bin, App_Code, etc.) IIS recycles the AppPool on a regular basis (daily) IIS itself might restart, or for that matter the server might crashI’m not convinced that running this code inside ASP.
Robin Day
c# asp.net excel
For part of a web application the user needs to import some data from a spreadsheet. Such as a list of names and email addresses. Currently we do this by asking the user to browse for and upload a CSV file.Unfortunately, this isn’t always possible as various corporate IT systems only allow users to access files from document management systems and they have no privileges to save these to a local drive or network share.The solution we have is to allow the user to cut and paste the entire sheet (C
Ocelot20
c# asp.net wcf flex wcf-rest
I have the following method in my WCF service:[OperationContract] [WebInvoke(Method = “POST”, BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Xml, RequestFormat = WebMessageFormat.Xml)] public int GetOne(string param1, string param2) {return 1; }I am sending xml from a Flex application, and it takes an object that looks like this: { param1: “test”, param2: “test2” } and turns it into the following request:POST http://localhost:8012/MyService.svc/GetOne HTTP/1.1 Accept: ap
Keritaf
asp.net iis visual-studio-2012 iis-express
I have an ASP.NET project which uses IIS. IIS site is configured to use custom binding host name. Project file contains following settings:… <UseIISExpress>false</UseIISExpress> … <ProjectExtensions><VisualStudio><FlavorProperties GUID=”{349c5851-65df-11da-9384-00065b846f21}”><WebProjectProperties><UseIIS>True</UseIIS><AutoAssignPort>False</AutoAssignPort><DevelopmentServerPort>8662</DevelopmentServerPort><Development
diamandiev
asp.net
The thread will be started on each Application_Start event.It will be a monitoring thread which is supposed to run constantly.So even if the app shuts down, once it is restarted the thread will start too ensuring it runs all the time.However I need to be sure that this thread will not be stopped / shut down while the application is running.So in a few words, does anybody know if asp.net could shut down such a thread without actualy stopping / recycling the application.
kadourah
c# .net visual-studio-2010 t4
I’m building a T4 template and I’m referencing my custom assembly, the custom assembly references a native DLL.When I use the following syntax in my tt file : <#@ Assembly Name=”c:\projects\lib\xxx.dll” #>I get the following error: “Error 1 Failed to resolve assembly reference. The path ‘c:\projects\lib\xxx.dll’ must be either local to this computer or part of your trusted zone. If you have downloaded this template, you may need to ‘Unblock’ it using the properties page for the template fi
admdrew
windows visual-studio-2010 networking installer directory-structure
I have a C++ Windows application built in Visual Studio 2010 with a Setup project to create an .msi that installs fine when users have a local My Documents folder, but fails when their My Documents folder is located on a network drive.When installed locally, the installer creates Project and Data folders in their My Documents folder, but when I try to install to system with My Documents in a network location, the .msi fails with the cannot access network location error message. Looking at the in
ildjarn
c++ visual-studio-2010 visual-c++
This may be hard to explain. I have been developing a program for about a month now in MS VisC++ 2010 express. I have had no strange problems and was ready to build my project for the 100th time when suddenly, many of the .cpp files seemed to loose contact with the .h files. For instance, in the main function, objects that I had created and used weeks ago, suddenly got the red line under them and the syntax error “theClass is undefined”. This applies to iostream, so suddenly cout is undefine
Ryan Poolos
sql-server web-services visual-studio-2010 soap wsdl
I am a DBA, not a developer, so forgive me if this is a silly question. But we are having issues with a SQL Server 2005 Web Service end point. On the local network I am able to add the reference in Visual Studio 2010 with out any issues. It uses digest as the authentication scheme.However, when anyone tries to add the web reference on another network, such as a developer in New Zealand (we are in Dayton, OH USA) he receives this error:There was an error downloading’http://server.domain.net:1280/
UmNyobe
c++ windows visual-studio-2010 string-formatting wstring
I am currently setting up the ffmpeg logger to use our own logging mechanism on Windows and I have issues with the formatted part of the output. The callback signature is :void(*callback)(void * handle, int dbglvl, const char * fmt, va_list vl);and I try to write into a wstring using the helper :std::wstring asStdWstring(const char *fmt, va_list vl){int required_length = _vscprintf(fmt,vl) +1; required_length++; // include null terminating characterif(array_length < required_length){array_len
Dan
visual-studio-2010 msi setup-project patch
We have three versions of our software. (e.g. V1.0.1, V1.0.2 and V1.0.3). I created full msi installers for these three versions(V1.0.1.msi, V1.0.2.msi and V1.0.3.msi) with Visual Studio 2010 Setup Project. In addition, I created patch updates (minor upgrades)(.msp package) among them as follows:Patch_1.0.2.msp (created between V1.0.1 and V1.0.2)Patch_1.0.3.msp (created between V1.0.2 and V1.0.3)When applying Patch_1.0.3.msp against a full installation of V1.0.2.msi, it works very well.But if in
nomannasim
visual-studio-2010 installation tfs2010
I am getting the below errors during installation of VS2010 ultimate trial in my Windows EventViewer, Application logs :-Product: Microsoft Team Foundation Server 2010 Object Model – ENU –Error 1935.An error occurred during the installation of assembly’Microsoft.TeamFoundation.Client,version=”10.0.0.0″,publicKeyToken=”b03f5f7f11d50a3a”,processorArchitecture=”MSIL”,fileVersion=”10.0.30319.1″,culture=”neutral”‘.Please refer to Help and Support for more information. HRESULT:0x8002802F. assembly in
Sean87
visual-studio-2010
I have a pc and laptop. When I am in university I work on a project (Or soloution) on my laptop. When I get back home I really want to work on the project using my PC (I got dual screen and ofcourse my PC is thusands time faster!).The projects are located in Documents\Visual Studio…… in my laptop and of course this folder is shared on the HomeGroup.I can open the project in my PC but when I try to build the project I get some errors like this:Error 1 Unexpected error creating debug infor
Aziz Shaikh
visual-studio-2010 build compiler-errors multi-targeting
VS2010 ultimate with Asp.net MVC 3.0 installed. “New” –> “Project”, choose “.Net framework 2.0” or “3.5”, then choose “Asp.Net web application”, starting a new 2.0 or 3.5 asp.net web application.Then build the project, or directly debug it by F5, producing the build error as follows:—— Build started: Project: TestAspNet35, Configuration: Debug Any CPU ——fatal error CS0008: Unexpected error reading metadata from file ‘c:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll’ — ‘Inde
Luke Girvin
visual-studio-2010 unicode emacs notepad++ linqpad
I created an ordinary text file on Windows 7 64-bit using gnu emacs 23.3.1. I can edit the file with other programs such as LinqPad (the file happens to be a linqpad script, extension .linq). Everything is fine until I put a Unicode character in the file, a character such as the greek letter ? (lambda). I can input the letter in emacs and it displays correctly. However, emacs refuses to save the file, reporting the following errorFailure in loading charset map: 8859-7If I input the ? in LinqPad,
Jim Lamb
c# .net c#-4.0
I’ve written some code to import content from my Blogger blog. Once I’ve downloaded all of the HTML content, I go through the image tags and download the corresponding images. In a significant number of cases, System.Drawing.Bitmap.FromStream is throwing an ArgumentException. The URL I’m downloading from looks good and it serves up an image as expected (here’s the URL for one of the problem images: http://4.bp.blogspot.com/_tSWCyhtOc38/SgIPcctWRZI/AAAAAAAAAGg/2LLnVPxsogI/s1600-h/IMG_3590.jpg). p
jace
wcf web-services c#-4.0
I downloaded MS WCF examples and got one setup on my local machine and running fine. I had someone else on the local network run my client.exe and it worked fine as well.Now I am trying to take the same service and apply it to it’s final home on the same local network but on our web server. The server serves up multiple web pages for us and we will be using it for a “new” forth coming application utilizing the WCF service.I have scoured stackoverflow and learned A LOT but have not found what I
user2290070
asp.net-mvc c#-4.0 import-contacts
I am trying to import contacts from Hotmail. For that i am using following codeprivate const string wlCookie = “wl_auth”;private const string clientId = “…clientId…”;private const string callback = “http://localhost:8465/”;private const string clientSecret = “…secret key…”;private const string oauthUrl = “https://oauth.live.com/token”;public ActionResult Index(string code){if (code != null){GetMsnContacts(Request.QueryString[“code”].ToString());} return View();}private void GetMsnContact
Martin Drlík
c#-4.0 operators
is there a reason for the type of the second operand must be int?… // I would like to do this public static StringList operator<<(StringList list, string s) {list.Add(s);return list; } // but only int is supported… …EDIT: Just for sure… I can overload operator* for get (for example) List of stringclass MyString {string val;public MyString(string s) {val = s;}public static List<string> operator*(MyString s, int count) {List<string> list = new List<string>();while (
Rethic
xml c#-4.0 lambda xml-parsing linq-to-xml
I have an XML file that is constantly being appended to. I need to read in the data from the XML repeatedly, but on each pass I do not want to retrieve data that I have processed in the previous run.Since I know how long the file is at the time of processing, I figure I could use the length of the file (minus the ending /Contacts tag) to determine where I last left off. Knowing this, what is the best way to retrieve all of the Contact tags starting from a particular byte position within the file
Esteban
c# .net c#-4.0 data-annotations
I have my models and mappings on two different files, on my mapping class I do this:public class UserEmailMap : EntityTypeConfiguration<UserEmail> {HasKey(t => new { t.UserId, t.EmailId });Property(t => t.UserId).HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);Property(t => t.EmailId).HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);ToTable(“UsersEmails”);Property(t => t.UserId).HasColumnName(“UserId”);Property(t => t.EmailId).HasColumnName(“EmailId”);Proper
MadBoy
c# winforms c#-4.0
I have simple WinForms GUI that I want to use with TabPages. The problem I’m having is resizing and working with multiple sizes of screens. What settings do I change for each TextBox, GroupBox to make it fit the screen nicely without making it feel to the user like it’s badly designed? Usually I would use Dock Fill but it doesn’t work with more then 1 GroupBox. Then I checked/played with Anchor trying to make it bind to Top, Left, Right, Bottom for everything but that makes a big mess (textboxes
Charles
c# asp.net c#-4.0 thread-safety static-function
I wonder how to define a class properly and use it safely. I mean thread safely when thousands of concurrent calls are being made by every website visitor.I made myself something like below but i wonder is it properly builtpublic static class csPublicFunctions {private static Dictionary<string, clsUserTitles> dicAuthorities;static csPublicFunctions(){dicAuthorities = new Dictionary<string, clsUserTitles>();using (DataTable dtTemp = DbConnection.db_Select_DataTable(“select * from myTa
Yuan
wcf c#-4.0 callback duplex
I have a self hosted wcf service using net tcp duplex callbackon client side, I listen on faulted event on Channel and ChennelFactory. when the channel faulted, client will recreate channel and re-subscribe.on server side, I store callback channel and a store a reference of the Channel by calling OperationContext.Current.Channel so that I can listen on the faulted and closed event on this channel. On faulted, server will remove that subscriber.This is working most of the time until recently I ob
sweetfa
linq c#-4.0 typemock
If I have a typemock test that fakes an instance where the members must specify return values such as below:WallLayers layers = Isolate.Fake.Instance<WallLayers>(Members.MustSpecifyReturnValues); Isolate.WhenCalled(() => layers.GetCoreProfile()).CallOriginal();If within the original GetCoreProfile method I have a linq querywallPoints = fe.GetFacePointsConstrainedBy<Int32>(FaceExtractor.BottomFace, constraints, selector1).Where(p => p.Z == wallReferenceLevel)when running the tes
Web site is in building