473,399 Members | 3,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

C# to VB.NET help(ASP.NET Web App) Enviroment Codes

Daxthecon
I know how to get the server information on the user but the former programmer did all this in C# and I have to do it in VB. Now he took the easy way out and only called certain directory attributes out for the stuff he knew. I am left sifting through all his code trying to find out how to get to the attributes he couldn't. There are hardcoded permissions so I can't post the code on a public website.

But I can write some Pseudo Code:
Expand|Select|Wrap|Line Numbers
  1. if (username == "director_it")
  2.             {
  3.                 name.Visible = true;
  4.                 changename.Visible = false;
  5.                 changename.Value = "manager/officelocation/employeename/Phonenumber";
  6.             }
  7.  
  8.  
  9.             reqdate.Text = DateTime.Now.Month.ToString() + " - ";
  10.             reqdate.Text += DateTime.Now.Day.ToString() + " - ";
  11.             reqdate.Text += DateTime.Now.Year.ToString();
  12.  

This is just one instance of this there are more for the managers in each dept. But thats not the half of it. What I want to do is have a table with information already filled in Ex:

Expand|Select|Wrap|Line Numbers
  1. Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
  2.         usenamelbl.Text = Page.User.Identity.Name
  3.         loclbl.Text = Page.User.
  4.         datetimelbl.Text = Date.Today
  5.         nametxt.Text = Page.User.Identity.Name
  6.         datetext.Text = Date.Today
  7.         phonetext.Text = Page.UniqueID(I am not sure how to do this one)
  8.         emailtext.Text = Page.User.Identity.Email(example purposes only)
  9.     End Sub
  10.  
What I am asking help on is the fact that I want to know how to go about diagnosing where these directories might be and when I find them how to call them. Now you may not be able to tell me how to find them but I really want to know how to call these things without hardcoding them as the last person did. That just seems like more work and after I get this one done and know how to do it then I won't have worry about how to do it next time. I am so new at this Web Application thing. It was so much easier in Software Applications.

Thanks in Advance.
Jul 9 '08 #1
7 1075
Plater
7,872 Expert 4TB
I didn't see any directories listed?

If the directories are directly related to a managed domain (there is a domain controller) then you should be able to use ActiveDirectory objects to find them?
Jul 9 '08 #2
Thats the thing no one here can tell me if they are or aren't. It's like some bit secret. I have looked through all the code and the references to files or any server has come up as an empty quest to find just system files. The only thing I can figure in my 3 hours search since posting this is that it is hidden somewhere in the depths of the IIS. But I've been through the IIS a couple times and the references in the code are something I don't quite understand since most the files are still php save a few newer ASP.NET/C# builds.

Thanks for you help though. I am completely confused and frankly so is everyone else in the office.
Jul 9 '08 #3
Plater
7,872 Expert 4TB
I'm still not even sure what you are trying to find?
Jul 9 '08 #4
An idea of where the AD might be or a way to force access to using Global VB commands.
Jul 9 '08 #5
Plater
7,872 Expert 4TB
Well using ActiveDirectory is similar to using a database.
I'm not too familiar with it, but there's a whole namespace out there for it I think.
MSDN ActiveDirectory in.Net maybe?
Jul 9 '08 #6
Curtis Rutland
3,256 Expert 2GB
System.DirectoryServices
Jul 9 '08 #7
Thank you lots. I have had a break through with all this code. What I thought was code pointing to files as the AD or Service Directory was just simple write to and read from(I can't read php as well as I can VB). He never tried to use AD there is non of that in his code or anything referencing in it. The confusion comes from the fact that he has all these labels that tell you what office you are in and who you are and what your phone number is making you think that there is some directory. Well it's sorta a smoke and mirrors trick. All he did was find pieces of public or global variables that he could read from(i.e. environment and ip numbers) and used filters and arrays to match a string to the output that is given in the labels and text boxes. 192.168.0.159 = NY office and so on... that was just an example. Thanks for the help guys. I wish all my problems where being a newbie problem. But some of them are just catching up to the guy before you.
Jul 9 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: mrwoopey | last post by:
Hi, I added a new .net login (http://support.microsoft.com/default.aspx?scid=KB;EN-US;326340) and a ..net Web Report Viewer (Crystal) to our site. If we are going to potentially have many...
1
by: Stuart | last post by:
Hi, I have a web site that is built using FOxpro database (free table directory) running on a Win2003 server and IIS 6. I am using a DSN as the connection string to the DB. To connect to...
3
by: Sachin_M | last post by:
Hi Friends, I want to develop a web based app where it will talk to a dll (which retrieves real time data from a controller) I've added a com dll reference to my project, the code is something...
2
by: MikeY | last post by:
Hopefully someone can help me out there. I"m running WinXP. Version of Visual Studio.NET is 2002. Studing Wrox C# Beginning. 1st. My problem is I am doing a new install, which when fine but...
1
by: Mike | last post by:
I have an application that was developed in VB.NET. Its been in production since October without any problems and that was the last time anyone touched any of the code. Today I got a call from a...
0
by: IronSights | last post by:
I have an application I developled for a shopping cart function using Wrox ASP.NET 2.0 book as a guide. I have everything working great on my local system using SQL 2005 Express. When I move the...
18
by: Andrew Wan | last post by:
I have been developing web applications with ASP & Javascript for a long time. I have been using Visual Studio 2003.NET. While VS2003 is okay for intellisense of ASP & Javascript, it's still not...
1
by: rmat | last post by:
Hi, I'm an engineering student who's just started working with ASP.NET as part of a training program. The language I am to work with is Javascript, and though I do know how to work with HTML, I...
0
by: fatimang | last post by:
hello., please show me sample codes on making a LISTBOX object., how to insert records in the LISTBOX? how to declare array? please show me the codes for navigation., how to open a new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.