We have an old asp application that instantiates a .NET com visible class. In this class, we do some serialization to store our object in the session.
When I call the following line of code in my test class, it works fine.
var cereal = new XmlSerializer(couponApplicator.GetType());
However, when it gets called in the website and I am debugging, it throws the following error:
{"Cannot execute a program. The command being executed was "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /noconfig /fullpaths @"C:\WINDOWS\TEMP\rwot-yx9.cmdline"."} System.SystemException {System.Runtime.InteropServices.ExternalException}
I thought maybe it was permissions related so I tried giving 'EVERYONE' full control to the windows/microsoft.net folder as well as the windows/temp folder. For reference, I am running this on a Windows XP machine.
to be able to send a XmlSerializer class (which is generated obvious in remote C# application) over a WebService that will then deserialize it into a class. (I didnt know it its possible either) XmlSerializer mySerializer = new XmlSerializer(typeof(SystemInfo)); StreamWriter myWriter = new StreamWriter(textBox1.Text); mySerializer.Serialize(myWriter, sysinfo); [WebMethod] public void Reports(XmlSerializer xmlSerializer)
When I create a form, I try to make accessibility a top priority, but the output from asp .NET negates some of this. For example, when I set a label tag for an input tag, I create it a such:
I have a requirement to automate the testing of .net application that generates some output files in pdf or html based on account number. How can I automate it to compare the results from DEV environment and the production environment? What is the best way to do so?
I have a Web Deployment Project in my solution. The solution consists of the MVC2 App and another Class Library.
In the Web Deployment Project properties I have the Merge all outputs to a single assembly option ticked and I have given it a name.
When I look in the bin folder I have all my reference DLL's from my MVC app, a DLL with the name of my MVC project and then a DLL by then name I gave it when choosing the Merge all outputs to a single assembly option.
I imagined this option would create 1 DLL not all DLL's plus another one.
how I can add outputs to my vb.net functions? The reason for this is that I have functions which return data tables for grid views. But I also want to pass a return value back to the calling routine, so that it knows whether the function succeeded or failed. It would also be good to pass strings back too, in addition to the returned data table.
I have a custom control which is rendered as a hyperlink:
Public Class TestControl Inherits System.Web.UI.WebControls.WebControl Implements IPostBackEventHandler Public Sub RaisePostBackEvent(ByVal eventArgument As String) Implements System.Web.UI.IPostBackEventHandler.RaisePostBackEvent Trace.WriteLine("Hyperlink 1 clicked") End Sub
Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter) writer.WriteLine("<a href=""{0}"" id=""{1}"">Hyperlink 1</a>", _ Page.ClientScript.GetPostBackClientHyperlink(Me, "Hyperlink 1"), _ Me.ClientID) End Sub End Class
This works fine. It also works nicely when put inside an UpdatePanel: Only the UpdatePanel is refreshed, no full postback is performed.
Now I would like to output a second hyperlink in the Render method. If I use the same id (Me.ClientID), everything works nicely, but this obviously results in broken HTML (no two controls are allows to have the same id attribute). If I use different client IDs (like Me.ClientID & "_1" and Me.ClientID & "_2"), a full postback is performed when the hyperlinks are clicked.
Is there some way to tell ASP.NET AJAX: "All postbacks of the following client IDs should be done asynchronously: ..."?
I've been watching a video on Scott Hanselmnn teaching MVC 2 tricks/tips. He mentions how MVC 2 by default uses ASP.NET Web Forms view engine to render the output of the views; he mentions that the web forms view engine is a little slower than it could be for MVC 2 since it generates a control tree and then outputs the HTML to the page (I hope I said that right).
I was wondering what he meant by web forms generating a code tree before outputting the HTML to the page. Does anyone have insight on the view engine of Web forms and the steps of the rendering process works for ASP.NET and MVC2?
I am developing a software that uses number precision, but I have this problem, it happens that when I take a string to convert to double it outputs me with a different culture.
For example I use
Convert.ToDouble("4089.90"); // it outputs 40.899,00
Is strange cause in my computer it works OK but on the client's PC (with the same culture in regional settings) shows me the latter output. I know I can fix it using
But there is a lot of code in the program using "Convert.ToDouble" and I wouldn't like to change all of it, on the other hand I want to understand why this happens.
I just need to ask something about .net assemblies. I'm sorry if this question may not be appropriate for this forum but it is very urgent and very important for me to answer so if any kind person can answer in simple and in detail about 'What are assemblies?' I googled about this but I got only one line definition for assemblies rest is only about private ,shared, manifest etc. etc. but I need to know what are assemblies.
I have an ASP.NET MVC 2 app targeting .NET 4 that needs to be able to resize images on the fly and write them to the response.I have code that does this and it works. I am using System.Drawing.dll.However, I want to enhance my code so that not only am I resizing the image, but I am dropping it from 24bpp down to 4bit grayscale. I could not, for the life of me, find code on how to do this with System.Drawing.dll.But I did find a bunch of WPF stuff. This is my working/sample code (runs in LinqPad).
// Load the original 24 bit image var bitmapImage = new BitmapImage(); bitmapImage.BeginInit();
I get that assemblies store data about an application, and its components. I am still clouded about several vital functions of this very basic concept and cannot for the life of me find a complete all inclusive reference or explanation of this topic. Exactly how far reaching is this within c#.net development? Where is it stored? How is it stored? Exactly what, in it's entirety is in it and how is it used and when? Please, please do me a huge favor. Do not send me on a wild goose chase to some self serving, obscure site with partial explanations that wastes my time. By the time I'm done studying the information within your referenced site or response, I want all of my questions answered.
The problem is when am assigning my session table value to newly created table and if now am changing any coloumn name then the session table value also changing.
But my question is am assigning Session value to newly created table so how should session value should be affected?
I need to look for specific types in all assemblies in a web site or windows app, is there an easy way to do this? Like how the controller factory for ASP.NET MVC looks across all assemblies for controllers.
What are the libraries, beside System.Web.Mvc, I need to run a MVC 3 RC2 application having the libraries in Bin Folder and not installing MVC 3 RC2?I am using JQuery and not Microsoft Ajax.
I'm trying to write some code to use reflection to load new assemblies. I observed the file system with FileSystemWatcher, so that if anything in the folder changed, I can get notified and then reload them.
Firstly I have an assembly filters.dll loaded. Let's say its version is 1.0.0. Then when I have a new one v1.0.1, I paste it into the folder and replace the older one. Of course this fires "Change" event of FileSystemWatcher, and finally lead to assembly reloading.
Everything works fine, but I just want to know, what would happen to the firstly loaded assembly? Get replaced by the newer one? Or still somewhere in the memory?
we have an asp.net web site (web application project of vs 2005) where we have a main project and same secondary projects which contain same apsx/ascx used by the main project.
for example in an aspx page of the main site we will use same ascx defined in another project)
at least with vs 2005 we must do a lot of hack to make it works becouse it's not possible to directly reference another web application to use aspx/ascx defined there.
i want know if upgrading to vs 2010 and mvc can help us to a better organization of this type of architecture (the best things will be if i can add a view as embedded resource of a project and i can use it by another project, as the server control of asp.net form)
Now in the same project for another requirement I have to introduce Antlr3.StringTemplate.dll. Which has a dependency on another version of the above assembly.
If I use the version of Antlr3.Runtime.dll which satisfies NHibernate , Antlr3.StringTemplate starts complaining and vice-versa.
I have a collection of assemblies using reflection. I want to loop through them, but I would like to ignore the .NET framework or ASP.NET framework DLL's. Is there an attribute on the assembly that marks that its from the .NET framework? Or any other designation?
I was looking at the name, and if the name of the assembly starts with System, Microsoft, or mscorlib, I am ignoring it. But I was wondering if there is a flag I can use to make this even easier?