Determine Whether Running In WinForms/console Without System.Web?
Mar 28, 2011
From a class library, I need to determine at run-time whether I'm running in an ASP.NET app or a WinForms/console app. There have been several other questions asked on the subject, but all of those solutions require adding a reference to System.Web. If at all possible, when running my console and WinForms apps, I don't want to load the System.Web assembly into memory just for one line of code out of thousands.
View 4 Replies
Sep 30, 2010
I have some shell scripts on a Windows 2003 server. These scripts process some flat files and upload data to Oracle using sqlldr. Currently I'm using telnet to go into the box and run each of these scripts manually. Is there a way that these scripts can be run from a ASP.Net/Winforms application?
View 1 Replies
Feb 11, 2010
I am learning C# in Visual Studio (VS), and in VS i have successfully made different 'projects' under the 'solution' for each fo the samples in my C# book as can be seen here:
[URL]
the thing is when i press the green play button to run the debugger/program, it always executes "ConsoleApplication1" (look at the above image) when i want to try out the new application i wrote (named ConsoleApplication3)
How do i do that?
View 1 Replies
Nov 19, 2010
I have a ASP.NET web application running under IIS 6, and another process that is responsible to monitor and report status. I'd like to sample the web application by the monitoring process in order to check its status by accessing a dedicated handler on the web application, BUT i don't want to "wake up" the web application in case it is not running. Is there an option to determine whether a specific web application is currently running? if there is such an option, i would be able to first check if the application is running, and only then to access the handler to check its status.
View 6 Replies
Feb 17, 2011
I have a .NET 2.0 web application which is running fine in file system. When I configure the same in IIS 6.0, I am getting config errors. Source Error:
Line 6: <system.web>
Line 7: <pages>
Line 8: <controls>
Line 9: <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 10: </controls>
Here's the entire web.config file:
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
<tagMapping>
<add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="Sample.Web.UI.Compatibility.CompareValidator, Validators, Version=1.0.0.0"/>
<add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="Sample.Web.UI.Compatibility.CustomValidator, Validators, Version=1.0.0.0"/>
<add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="Sample.Web.UI.Compatibility.RangeValidator, Validators, Version=1.0.0.0"/>
<add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="Sample.Web.UI.Compatibility.RegularExpressionValidator, Validators, Version=1.0.0.0"/>
<add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="Sample.Web.UI.Compatibility.RequiredFieldValidator, Validators, Version=1.0.0.0"/>
<add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="Sample.Web.UI.Compatibility.ValidationSummary, Validators, Version=1.0.0.0"/>
</tagMapping>
</pages>
<!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development.-->
<compilation debug="true">
<assemblies>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
</system.web>
<!--<system.web.extensions>
<scripting>
<webServices>
--><!-- Uncomment this line to customize maxJsonLength and add a custom converter --><!--
--><!--
<jsonSerialization maxJsonLength="500">
<converters>
<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
</converters>
</jsonSerialization>
--><!--
--><!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. --><!--
--><!--
<authenticationService enabled="true" requireSSL = "true|false"/>
--><!--
--><!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and
writeAccessProperties attributes. --><!--
--><!--
<profileService enabled="true"
readAccessProperties="propertyname1,propertyname2"
writeAccessProperties="propertyname1,propertyname2" />
--><!--
</webServices>
--><!--
<scriptResourceHandler enableCompression="true" enableCaching="true" />
--><!--
</scripting>
</system.web.extensions>-->
<!--<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</handlers>
</system.webServer>-->
View 2 Replies
Feb 4, 2011
I have two systems (System A & System B) both are windows xp.
System A is 32 bit operating system with more Memory so I Installed Visual studio here.
System B is 16 bit with low memory and some peripheral(Finger Print Reader, Thermal Printer) attached.
Now I need to develop a application for System B. Peripherals are attached with system B Only so i need to debug the application which is running in system B. But I cannot install visual studio in system B. Now how can I do that?
View 3 Replies
Mar 5, 2010
Why is there a need to explicitly call GridView.DataBind() to render the gridview. Why wouldn't it render by itself automatically like how it happens in Window Forms?
View 2 Replies
Aug 9, 2010
We have an ASP.net application but some screens are deemed too slow to use by our users.As a result, we are trying to provide a WinForms-based alternative to those data-input centric screens so we can use richer controls like Grids with immediate screen updates and feedback for the user.
Ideally, I would like the users to login to the WinForms application using the same credentials they use in the ASP.net application?
Is it possible?I've found this post ( http://stackoverflow.com/questions/1172069/net-authentication-for-both-web-and-winforms ) but it isn't really answering the question from my point of view... We are not using WebServices, or WCF at the moment and do not plan to use it unless it is really the only way to achieve this.
View 2 Replies
Jan 1, 2010
I work with many diverse technologies, and don't possess the time to evaluate every single UI framework, so I'd appreciate hearing other coders' experiences with various frameworks.
The stuff I've worked with so far (and my perceptions):
WinForms: DevExpress (love the looks, hate the API and bloat), Krypton (free!, looks good, but limited), Telerik (don't like the looks)WPF: have only used WPF Themes pack. Asp.Net: Telerik MVC Controls (love it), jQuery UI (looks great)
View 1 Replies
Feb 7, 2010
I know S#arp architecture is built for ASP.NET MVC. But I'm wondering if it can be used in classic ASP.NET (WebForms) or even desktop applications like WinForms or WPF.
View 3 Replies
Aug 10, 2010
I need to know whether there will be any problem using win forms control as a custom control in my web app. Problems can be anything related to display, environment where the site is run.
Reason for using is I am not getting the treeview events in web which are there in win app. I need to implement drag drop of treeview nodes to a listbox.
View 2 Replies
Jul 5, 2010
my application not working when I publish (only files needed to run this application) it to the server. I set wildcard mapping in IIS. I'm getting the error below:
HTTP Error 404.4 - Not Found
The resource you are looking for does not have a handler associated with it.
View 2 Replies
Dec 12, 2010
in asp.net we can handle the RowDataBound event of the GridView control. this event fires when every row is added to the gridview.
i want to be able to handle this event in the gridview in a winforms application but i cannot find a similar event. my question is what is the event name that allows me to do the same as RowDataBound in asp.net?
View 1 Replies
Oct 10, 2010
[URL]
How can i create a window that holds Patient data in it? The 2 records that you see is in List View. I would then using ContextMenuStrip for text "View Details". When View Details is clicked i need to show the context. For web development this could be done via Javascript,div and panels. How that should be WinForms?
View 2 Replies
Jun 3, 2010
I need to find a child control in a winforms panel. I was wondering if there is a method similar to Panel.FindControl() of the asp.net webforms panel in the .net winforms version
View 1 Replies
Jul 1, 2010
I am executing a long-running Oracle stored procedure from .NET. The procedure takes about three hours to run. Ideally, the user should be able to kick off the procedure, close the browser, and come back later to check the results.
The problem is that the connection to the Oracle procedure is lost after exactly an hour. As you would expect, the Oracle procedre runs to completion if it is executed from SQL Plus. Strangely enough, it will also run to completion if I run in debug mode on my local machine (I start two threads, one of which executes the procedure. I set a breakpoint on the second thread).
Here is my connection string:
data source= (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=serverx)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=TestSID)))
Some relevant sections from web.config:
<sessionState mode="InProc" cookieless="false" timeout="3000" stateNetworkTimeout="72000"/>
<httpRuntime executionTimeout="18000" maxRequestLength="2097151" />
Any thoughts as to why the connection is being lost in exactly an hour, and what I can do to maintain the connection until the procedure finishes?
View 1 Replies
Sep 6, 2010
Given:
<input id="datepicker" type="text" />
Where the id = datepicker tells the javascript to attach all the datepicker code to the form element, how do I turn this into a server control?
For example:
<input runat="server" id="datepicker" type="text" />
Doesn't work because ASP.net generates it's own ID's.
Edit
<asp:TextBox runat="server" ID="dateTo" class="datepicker"></asp:TextBox>
Renders as
<input name="ctl00$mainContent$dateTo" type="text" id="ctl00_mainContent_dateTo" class="datepicker" />
And doesn't work!
View 3 Replies
May 5, 2010
I'd like to create a custom datasource that is shared between a Winforms and Webforms project. This functions as a middle layer for a reporting tool(DevExpress Reporting). The Webforms project is a designer for these reports. So we want for the reports to be capable of going to the server to get data and such. So our datasource would abstract away all the communication overhead. Then, for consistency, the datasource would also run on the server for reporting, except for their would be no communication.
What would be the best course of action? There doesn't seem to be such a thing as a DataSource in Winforms. Is DataSource not the thing I'm looking for?
Edit: After some research, it appears that IDataAdapter may be good for my purpose. Any opinion on that?
View 1 Replies
Jun 5, 2010
After developing ASP.NET apps exclusively for several years I'm about to start developing Winforms apps. What are the gotchas that I should be looking out for with this changes? For instance the way object lifetime is managed in the winforms paradigm. I'm sure there must be plenty of gotchas / differences between the two that I need to be mindful of.
View 2 Replies