The title says it all really! I want to be able to check in my code whether the current environment is live or sandbox - is it possible?
View Complete Post
You could execute a function call that is not allowed in the sandbox (for example call a static method on SPSecurity) and catch the exception. A better approach is to test the friendly name of you app domain:
AppDomain.CurrentDomain.FriendlyName returns "Sandboxed Code Execution Partially Trusted Asp.net AppDomain"
Because you can never be sure that this string changes in the future, a safer approach will be:
See http://www.sharepointoverflow.com/questions/2051/how-to-check-if-code-is-running-as-sandboxed-solution for a discussion on this topic.
Jeff Prosise describes performance problems in an ASMX Web service that relied on legacy COM and Visual Basic 6.0 to perform key processing tasks and the approach he took to find a fix.
MSDN Magazine October 2006
Reliability requires the capacity to execute a sequence of operations in a deterministic way, even under exceptional conditions. This allows you to ensure that resources are not leaked and that you can maintain state consistency without relying on application domain unloading (or worse, process restarts) to fix any corrupted state. Unfortunately, in the.NET Framework, not all exceptions are deterministic and synchronous, which makes it difficult to write code that is always deterministic in its ability to execute a predetermined sequence of operations. In this article Stephen Toub will show you why, and explore features of the .NET Framework 2.0 that help you to mitigate these situations and write more reliable code.
MSDN Magazine October 2005
There are plenty of times when you need to get information on running processes, not the least of which is during performance tuning. Using the techniques in this article and special .NET classes you'll see how to get a process' ID, name, priority, number of threads, kernel handle, and memory consumption, as well as its user-mode, kernel-mode, and total elapsed running time and put them to use in a custom app called AssemblyBrowser.
MSDN Magazine October 2004
This article describes a collection of new programming frameworks that are part of "Longhorn," the upcoming version of Windows. "Indigo," the code name for this framework, provides rich support for service-oriented design that is complementary to traditional object-oriented approaches. Indigo marries the best features of .NET Remoting, ASMX, and .NET Enterprise Services into a unified programming and administration model. Indigo's deep support for standard protocols, including HTTP, XML, and SOAP, makes it easier to integrate applications and services without sacrificing security or reliability.
MSDN Magazine January 2004
Here is the initial output of my program after running it from WinDbg:
CommandLine: "C:\Documents and Settings\Administrator\My Documents\Work\QMI_Test_Tool\QMI_UT_Source\Release\QMI Validation Tool.exe"
Symbol search path is: SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
Executable search path is:
ModLoad: 00400000 0048f000 QMI Validation Tool.exe
ModLoad: 7c900000 7c9b2000 ntdll.dll
ModLoad: 79000000 7904a000 C:\WINDOWS\system32\mscoree.dll
ModLoad: 7c800000 7c8f6000 C:\WINDOWS\system32\KERNEL32.dll
ModLoad: 77dd0000 77e6b000 C:\WINDOWS\system32\advapi32.dll
ModLoad: 77e70000 77f03000 C:\WINDOWS\system32\RPCRT4.dll
ModLoad: 77fe0000 77ff1000 C:\WINDOWS\system32\Secur32.dll
ModLoad: 7c420000 7c4a7000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\MSVCP80.dll
ModLoad: 78130000 781cb000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\MSVCR80.dll
ModLoad: 77c10000 77c68000 C:\WINDOWS\system32\msvcrt.dll
ModLoad: 7c9c0000 7d1d7000 C:\WINDOWS\system32\SHELL32.dll
ModLoad: 77f10000 77f59000 C:\WINDOWS\system32\GDI32.dll
ModLoad: 7e410000 7e4a1000 C:\WINDOWS\system32\USER32.dll
ModLoad: 77f60000 77fd6000 C:\WINDOWS\system32\SHLWAPI.dll
ModLoad: 7c4c0000 7c53d000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\m
If I have the 'ExecutionInstanceGUID' value for an SSIS package that I know was started, is there a way that a stored procedure can programmatically determine whether the SSIS package still is running?
I'm working with two Visual Studio 2005 solutions.
The first is "WinX" with a project called "WinX". There's a class in the WinX project in a namespace called "WinX" with a class "frmMain". frmMain is the main form for the application, and is always open.
We have this static member declared as so in frmMain:
public static bool IsfrmViewTaskFormOpen = false;
Enter our second solution "TasksProcessScreen" with a project "TasksProcessScreen" which has a namespace of "TasksProcessScreen" with a public class frmViewTask. The solution has the "WinX" project added as a project.
In frmViewTask, there is the following code:
private void frmViewTask_FormClosed(object sender, FormClosedEventArgs e)
//This does NOT compile! It says "WinX" does not exists in the current context.
I am writing a web user control that is basically a vertical single level menu. The layout would look like this:
<asp:Table ID="myTable" runat="server"> <asp:TableRow> <asp:TableCell> <asp:HyperLink>Menu Choice</asp:HyperLink> /* which would resolve to the following line. <a onclick="__doPostBack('theUniqueIdOfTheUserControl','myArguments');">Menu choice</a> </asp:TableCell> </asp:TableRow> . . . etc.</asp:Table>
However, I am externalizing the layout to an XML file and am building the table content dynamically. The source view of the ascx actually looks like this:
<asp:Table ID="myTable" runat="server"></asp:Table>
In the Page_Load of the code behind, I read and parse the XML file and save all the pertinent data in the viewstate on the first load. On all loads including postbacks, I create the rows, cells, and hyperlinks from the viewstate so I don't have to parse the XML file on every postback.
The XML file also specifies CssClasse
i wrote a copy web service i added two web reference first for list and second for copy i took two buttons on first click i wrote a code for getting address of attachments and on second click i wrote copy functionality for copying some attachments
into another list in 2 different site now my code is error free but while running i am not getting buttons on form my code is-