.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Website access

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :ASP.Net

If I upload my web application in a server then can I still extract users Windows LogIn ID using :
string ssid = System.Environment.UserName; 
in my web application's User Verification WebPage and use it in following pages by storing it in Session variables? It should be mentioned that I am working in a web application for a company where all employees have their own laptops and they login to the Windows system  using their laptop's windows LogIn Id and password. These loginId has been decided by the company, and so stored in a company database. Employees can't enter the system until they provide correct login Id and password. Server will be company's internal server. Thsi webapplication will be accessible only by the company employees and company has it's own intranet. As far as I know, it should be fine. Please let me know if I am wrong and suggest me something. I want to extract users Windows login Id when they will try to access my web application using the URL (link related to the server where I will upload my application)


View Complete Post

More Related Resource Links

No Access to Reporting Services Manager Website

Hi, I am trying to  access the report manager website with http://localhost:8080/Reports. I know that this was working in the past with the Administrator user. Now I get the login Form repeatedly and I have no access with any user. With the administrator user I can access the reporting services in Management Studio but not the website. Please help....

SBS 2008 Premium Edition - Securing SQL Server while allowing access from e-commerce website.


Reposted from SBS forum:

I'm currently planning an SBS 2008 Premium Edition installation for a client currently running a five old Win NT / Server 2003  machines to serve a small company (fewer than 50 people).  A complicating factor is that one of their e-commerce websites is currently served directly from their production SQL server - a security risk made necessary by the limitations of their e-commerce software.  In the SBS 2008 plan I would like to protect the production SQL server from the Internet.  My question - is there a way of replicating the production SQL database in real time on a second SQL server outside the firewall?  If not, what other options are available?

I'm not an SQL specialist so I'd also be grateful for links to useful web resources on the topic.

Thanks in advance.


How can I access my sharepoint 2007 website from another machine ?


Hi all,

At the moment i cannot connect sharepoint 2007 server from other machine. Basically Sharepoint 2007 server is up and running an my virtual machine.It works well and I can access it very well from my virtual machine. However i cannot access this sharepoint site from my base machine.

When i enter the address http://moss.mysite.com/Docs/default.aspx it showed this error :

"Internet Explorer cannot display the webpage"

The same address would work in my virtual machine.

What configuration needs to be made for this server to be available to everybody ?


Furthermore i can access other applications of the virtual machine.

For example i can access the K2 workspace from my base machine. The K2 workspace is located in the same virtual machine as the one

for sharepoint.


What could be the issue here ?


My XML to access a WebSite is not working!!! Help! Help!


I am sending the following xml to access a website and getting the error with the stack.  I have spent weeks on it and getting no where.  Could some one please HELP!!!?  I am willing to pay for the advice as well, as I am getting sick of this!  Thanks in advance for help.  Kel Shorey


<?xml version="1.0" encoding="utf-8"?>
<ers uname="---------------" pword="------------------" myAttribute="fooBar" anotherOfMyAttribute="123456">
    <SalesNote snType="S" action="INSERT" salesContractRef="" saleDate="09/11/2009 00:00:00" auctionID="14" logBookNums="" landingDecNums="" vesselName="Jessica Louise" vesselPln="BM237" vesselMasterOwner="Cowe D" landingDate1="09/11/2009" landingDate2="" landingDate3="" countryOfLanding="GBR" landingPortCode="245">
        <SalesLine speciesCode="JAD" faoAreaCode="27" ZoneCode="VIID" disposalCode="COV" freshnessCode="C" sizeCode="2" presentationCode="FIL" stateCode="FRE" numberOfFish="

Access ASP.Net website in a mobile phone



I have an internal ASP.Net application. We want to extend the accessibility of this application for the users using their mobile phone.

The application runs on an internal server of the company.

Is it possible to open the website(internal within the intranet) in a mobile phone and perform operations?

Thank you,


Restrict login access to website from specific machine


Not sure if this is the correct forum section but I need to restrict access to my website by physical PC.  When a user signs up I want to be able to restrict access to one machine for that account so it cannot be shared round, if, for example, somebody else in the same office wanted to access the system on their PC they would need a seperate sign in.

I have done some investigation and I "think" the only way is installing an ActiveX component (which isn't an issue that is restricts to IE only) and then read the users MAC address.  Am I trying to over complicate things or is that the only way?  I realise that MACS can be spoofed but this is not much of an issue.


Session lost when access MVC website by hostname likes http://mypcname/ using IE


Hi experts,

I'm learning asp.net mvc 2, it's very excting with me.

I has built a small MVC2 application, it is working fine in built it ASP.net Development Server. However, there're something wrong when have it deployed in IIS 7.5, Window Server 2008 R2 Enterprise. Session is awlays null when I access the application by IE and use hostname to specify the url.

Using IE (IE 7 or IE8) to access my application with link http://localhost/ or http://<my ip address>/     => every working fine

But when I use IE (IE 7 or IE8) to access my application with link http:/hostname/    => session always null

I'm supprised while FireFox working fine in all cases, both of built in ASP.net Development Server and IIS server, both cases hostname and ip and localhost.

I really appreciate your advise!


MVC architecture in ASP.Net using C# and Microsoft Data Access Application block

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]:

Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

View. The view manages the display of information.

Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.

Store and Display Images from MS Access Database Using C#

There is only the difference of coding syntax to stream the binary data of image content type to upload it into MS Access Database using C#/VB in ASP.Net 2.0

Namespaces required:-
using System.Data.OleDb;

OleDb is used to connect the web site forms with MS Access Database using Microsoft.Jet.OLEDB.4.0

ASP.Net Upload Image to MS Access Database

As you learnt from the previous articles to upload image to the SQL Database in ASP.Net 2.0 and stream that image into the memory to retrieve it from the database and display it on the web page. In this article you will learn how to upload images to the MS Access database in ASP.Net 2.0

First of all create an Access Database and place it in the App_Data folder of ASP.Net web site project. Then create a table "tblImg" with the following fields:

Resources for soup-to-nuts of website development lifecycle



 I'm looking for a website, or book, or some resource that can lead me down the path from website design to implementation/deployment. I know that covers a ton of material, but I am really looking for the bullet points, or high-lights, to make sure that I think of everything. I am mostly fuzzy on security measures and deployment since I haven't been involved in those aspects before.

Background:  I have been a programmer for many years, and with a little over 3 years' experience coding websites in vb.net/asp.net with sql server. Due to recent restructuring/layoffs at our firm, I find myself in the position of lead IT person - I'm feeling a bit underqualified but I feel this is my chance to work hard and step up to it. I'm very good at vb.net, master pages, css, asp.net, sql server. I'm worried that the person who was the lead before was doing a bunch of stuff that I'm not aware of...so I need to start learning more than just the code. I don't need lessons on how to code anything...I need to learn how it all gets put together - the next step up.

thanks for any suggestions!

website load testing


How can i check "load testing" on my site (its using vb.net and SQL server)? Any free tool available or can it be done through windows server IIS?

Difference Btw Website vs Web application and Virtual directory in IIS 7


May i know what is the Differenc that they actually make in IIS7 .

Please tell me at a low level as i am still a novice in Asp.Net


Thanks in Advance.


Why isn't my Views/Home/Home.Master file published when I publish my website?


Hi All,

I spent the better part of today hunting down an elusive error.  I was getting a message saying that it couldn't find the Index view for the Home controller, and it gave a list of locations it searched, e.g., ~/Views/Home/Index.aspx.  This was really confusing as the file definitely existing and was at ~/Views/Home/Index.aspx, the first place in the list of locations it searched for the view!

What I eventually discovered was that there was a file that did not get published when I used Visual Studio's "Publish" feature (this is on the "Build" menu).  That file was Views/Home/Home.master, and (as you can probably guess) is the master file used by Views/Home/Index.aspx.

Once I copied that file into place manually, it started working.  But I am left wondering--why???  Why does this file not get published?  It's a part of my project, I can see it in the solution explorer, and it's obviously a critical file that's necessary for the MVC app to run.  It has the same permissions as every other file in my project.  So why wouldn't it get copied?  And how can I fix it so it does get copied?

Thanks for any suggestions on this!


VS2010 Professional .NET 4.0 Remote Debugging ASP Website Project


Trying to remote debug ASP website from VS2010 Pro to Windows Server 2003 machine.  Specifically, trying to debug a Web Service, but breakpoint says, "The breakpoint will not currently be hit. No symbols have been loaded for this document."  This happens for all compiled code though.  I have read this is due to missing PDB files and the work around is to manually copy them, as noted here.  Problem is, I cannot find any PDB files for my project, except referenced libraries, which I can remote debug.


  • web.config has <compilation debug="true">
  • Debugger is attached to wewp.exe process on remote server
  • Installed VS2010 remote debugger from DVD (as I can remote debug referenced libraries)

This is beyond frustrating.  I migrated my code from VS2008 .Net3.5 to VS2010 .Net4.0 to take advantage of the inherent multithreading framework.  Debugging works when using local host and was stable until deployment to test server.

Thanks in advance,


Wrong Account being used to access files - Help - No Impersonation


I run a simple .aspx website on a Windows Server 2008 machine.

There is NO impersonation, and System.Security.Principal.WindowsIdentity.GetCurrent().Name returns NT AUTHORITY\NETWORK SERVICE, which it the account which the application pool runs. In my web.config, I have <authentication mode="Forms">.


I tried to test the security of the application and server by removing file permissions to the .aspx files. I was greatly worried when the website continued to run without problem (it should not have been able to read the .aspx files).

By turning on file level auditing, I discovered that the .aspx files were being read by the machine$ account (if the machine is called Serv1, then the files would be read by the Serv1$ account, which seems to have access to all files on the local machine).


Is this a security breach or is this behaviour by design ?

Please can somebody assist, as I am worried.

Disallow Direct Access To Files



Here is my dilema, on my site i have a WordPress Audio player (http://wpaudioplayer.com/standalone) that plays my mp3's.

It loads the Mp3's in by javascript...example below:

       AudioPlayer.embed("audioplayer_7", { soundFile: "/Files/Music/[name of file].mp3" });

This file name is clearly visible in the browser source. Not a problem, however this means that any user can legitimately browse to the file directly and download it.

Now i still need the mp3 player (which is flash) to have access to the file but if a user was to try accessing the file directly, they would not be allowed access to it.

I am not sure how to go about this, i am circling the idea of a httphandler but not sure if this is sufficiant to stop the direct access to the file.

Any help would be appreciated

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend