• 0

Environment Makes Web App Code Fail (Srv 2008)


Question

My problem is that IIS applications run in some sort of a "zone" which is drastically different from "ASP.NET Development Server" or running code outside of IIS.

Is there any way to set IIS to run Web Applications without limitations?

For example same code in a Console Application wil work without issues, but if I put it in a Web Application, it does fail.

Issues such as the temporary directory pointing somewhere the light doesn't shine or having no printer access are fixed by assigning a normal user to an Application Pool. Still,

Problem 1

On a development environment, if you launch an application (Process p = Process.Start(...)) on, say, Page_Load event, you will see that application pop up.

This doesn't happen on IIS. It hides the application nonetheless.

Problem 2

Some calls to COM seem to fail through IIS while working just fine when the same code is run via Console Application.

Problem 3

The Console Application from Problem 2 fails to run if launched in an Web Application via (Process p = Process.Start(...))

Problem 4

So considering that lots of code fails in IIS and applications launched via IIS are also dumbed down shells of their forme3 glory.

I tried using MemoryMappedFile to communicate between an limited proces on IIS and normal forms application which does rendering.

The thing is the MemoryMapped File is not accessible either on IIS.

I can't have a

MemoryMappedFile.CreateOrOpen("NAMEHERE", 1024 * 1024, MemoryMappedFileAccess.ReadWrite);

on IIS and access it from a different application on the Server - but it works just fine in development environment or between two normal applications.

Does anyone know how to launch a normal user environment process form IIS?

Does anyone know how to share a MemoryMapped file between IIS and anything else?

Does anyone know how to run Web Application in the same exact environment and permissions as a normal Application?

I really do not want to revert to writing communication data to disk so it could be shared between IIS Web App and a normal application - it was difficult and hard enough to get MemoryMappedFiles to work with Mutexes.

2 answers to this question

Recommended Posts

  • 0

Web Development, you're doing it wrong.

Useful Comment - You are Doing it Wrong.

I do not have the luxury of making a normal application - so I have to work around IIS security and environment issues, somehow.

The most baffling this is that Memory Mapped Files are not accessible (or something?) when accessed from IIS or created in an IIS environment,

does anyone know how to create a Memory Mapped File in .NET 4.0 where they are properly accessible between IIS application and other applications?

I am going to ask Stack Overflow as well.

Edited by _Alexander
This topic is now closed to further replies.
  • Posts

    • Got it. Seem like a good improvement. Thanks. But, before we "Add the source to Trusted Sites," how would know if it is trusted or not? Could get messy for not first Knowing" it is clean. See what I mean?
    • AB Download Manager 1.9.0 by Razvan Serea AB Download Manager is an open-source, feature-rich download manager designed to accelerate downloads, organize files efficiently, and provide seamless control over downloads. With support for multiple connections, resume capability, and an intuitive interface, it enhances the downloading experience for users seeking speed and reliability. The software integrates with various browsers, enabling quick link grabbing and batch downloading. It supports HTTP, HTTPS, and FTP protocols, ensuring broad compatibility with different file sources. Users can schedule downloads, set speed limits, and categorize files automatically for better organization. AB Download Manager is lightweight yet powerful, making it a great alternative to proprietary download managers. Its open-source nature allows developers to contribute, customize, and improve the software as needed. Whether you're downloading large files, managing multiple downloads at once, or seeking an ad-free experience, this tool offers a practical and efficient solution. Key features of AB Download Manager: Multi-Connection Support – Accelerates downloads by splitting files into multiple segments. Resume Capability – Allows paused or interrupted downloads to be resumed without starting over. Batch Downloading – Supports downloading multiple files at once for improved efficiency. Browser Integration – Captures download links directly from browsers for seamless operation. HTTP, HTTPS, and FTP Support – Ensures compatibility with a wide range of file sources. Download Scheduling – Enables users to automate downloads at specific times. Speed Limiting – Lets users control bandwidth usage for optimized performance. File Categorization – Automatically organizes downloaded files into designated folders. User-Friendly Interface – Simple and intuitive design for easy navigation. Cross-Platform Compatibility – Works on multiple operating systems. Ad-Free Experience – No intrusive ads or tracking for a clean user experience. AB Download Manager 1.9.0 changelog: Added Czech language support User-friendly error messages for download errors (#1252) An option to remember the last selected queue and quickly add downloads to it by long-clicking the Add button ( #1246) An option to export/import downloads using JSON format A Download button on the multi-download page for cases where users do not want to start downloads without queue processing (#1247) The app now includes a logger that can be enabled using a command-line flag (#1226) Startup errors are now logged automatically to help diagnose initialization issues Changed The default unqueued "Max Concurrent Downloads" value has been changed from "Unlimited" to 3 (This can be customized in the app settings) Improved Updated translations Added an indicator on the Android main page when resume is not supported (#1248) Extract the file name from the download link as a fallback when no response information is available (#1209) Minor UI/UX improvements Download: AB Download Manager 1.9.0 | Portable | ~80.0 MB (Open Source) Download: ARM64 | Portable ARM64 | Android Links: AB Download Manager Website | Github Page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • I just started using Teams (and “New” Oiutlook) at work (instead of Slack) and both are truly abysmal pieces of software.
  • Recent Achievements

    • First Post
      DragonOfMercy earned a badge
      First Post
    • First Post
      bella52 earned a badge
      First Post
    • Reacting Well
      Techinmay earned a badge
      Reacting Well
    • Collaborator
      WndSks went up a rank
      Collaborator
    • One Month Later
      Sopa flores earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      493
    2. 2
      PsYcHoKiLLa
      208
    3. 3
      +Edouard
      154
    4. 4
      Steven P.
      85
    5. 5
      FloatingFatMan
      72
  • Tell a friend

    Love Neowin? Tell a friend!