|
This seems like a complex task for a beginner, are you teaching yourself ? You should start with something simpler.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Learner520 wrote: how i can add same userid in student table as it has been added in users and membership table
u have to add the UserId in 'your' table yourselves ...
Learner520 wrote: how i can add student data like(CourseId,startdate) wit same user Id
u can extract the UserId of any user using UserName.
MembershipUser mu=Membership.GetUser("<username>");</username>
Apurv
“Never trust a computer you can’t throw out a window.”
(Steve Wozniak)
“There are only two industries that refer to their customers as ‘users’.”
(Edward Tufte)
|
|
|
|
|
thanks for your answer, but I'm sorry I have just realized that I should explain my question properly actually I have three roles in my database CourseTutor, Supervisor, and Student. I want to maintain Student data for this strong reason I need all UserIds' which belong to student and it should save into student table. (I want to work on StudentIds' rather than their names). Is this possible to get all those UserId's which related to Student's role, from Stored procedure.
regards
learner
|
|
|
|
|
u need not store roles and userids separately ...
while registering users, assign a role to them ...
now to store personal info, create a table with columns about UserId,name,address etc ....
in the CreatedUser event handler, add a row in this table ...
to know the role of any user, u can use
Roles.GetRolesForUser("<username>");
u can use,
Roles.GetUsersInRole("<rolename>");
to get all the users in a particular role ...
Apurv
“Never trust a computer you can’t throw out a window.”
(Steve Wozniak)
“There are only two industries that refer to their customers as ‘users’.”
(Edward Tufte)
|
|
|
|
|
I really appreciate that you gave me the exact answer what I'm looking for.
thnx again. actually I was doing the same as you have mentioned like register a user form Asp.net configuration and assign them roles. but I wasn't sure how to store all UserId's which belongs to Student's role into Student table as well.
regards
learner
|
|
|
|
|
hi..
i have a problem in asp.net as follows..
question1
radiobutton1 radiobutton2
now i want this code to be genrated 10 times in a .aspx.cs page. and after that how can i identify all those radiobuttons and question (displayed in label).as if i create thease contols in run time it is not differentiated by me.and if i create it desigen view i have to reapete all code (feathing from database ) for every set of controls(for every datarow).
Values of question and radiobutton fetchs from database.i want to check it on a button click from database .i want all this for a online paper..
can anyone send the code for it in c#..
thanks in advance
|
|
|
|
|
rahuluni wrote: can anyone send the code for it in c#..
I doubt that.
You identify the radiobuttons by name. You cannot set the client side id, but it's generated based on the server side id, and if you want to identify it on the client side, you can create js variables that map to the client ids. You can also set tags to identify them.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I have huge excel files with columns havng redundant data. I want to transfer all the excel data into a sql database which is properly fragmented that is 2 tables are used to get the one to many relationship working...
Is there any easy way of doin it... Can anybody provide help regarding SSIS and Dts. i am unable to find Business Intelligence studio .. I don't think i have it...
Please provide help and links to help sites
Thanx
haseeb
|
|
|
|
|
Do you have programming experience ? You could write a VB.NET application that would open the Excel document, loop through the rows and create INSERT statements to your SQL server.
|
|
|
|
|
|
Is there any way to map to multiple tables...do i have to create the database for it manually and then use dts or all tables will be created automatically. also my excel file well there are 2 of them lead to about 10 sql tables of data... how would i be able to fill up these tables with data from excel file which is more than 15mb.
how do i get ssis on my system
thanx
haseeb
|
|
|
|
|
there is only one way to find out. Make a copy of your excel file and try it out. you want learn unless you try it.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi,
I have a link my aspx page and onclick of that i need to download
and run the msi(ie i need to run a command in client like "msiexec /i http://(servername)/(virtual directory name)/test.msi ALLUSERS=1" )
which is present in the webserver(IIS 5 or IIS 6)...(it"s an intranet application)
as of now im giving the path of the msi to the link ....but the requirement is to
run msi using msiexec so that we can even perform passive installation...
Please help me out .....and correct me if im wrong
|
|
|
|
|
It can not be done. IE will not allow you to execute the msi file. You have two choices
1. write an activex code and with permission from the client you can execute what ever you want. But this only works on IE and you need the client to give you permission
2. Let the client download the msi file and give them instructions in your page how to execute it.
Imagine if someone can write malicious code and use IE to execute it, that would be huge security hole.
|
|
|
|
|
Thanks for ur reply...
please let me know how can i write an ActiveX control and use in my webpage...
|
|
|
|
|
Hi,
I have an application that has been developed mysomebody else and i want to continue developing it...
It has the following connectionstring
< name="abc1" connectionString="Data Source=SERVER\SQLEXPRESS;Initial Catalog=abc;Integrated Security=True"
providerName="System.Data.SqlClient" /> in web.config file;
As i understand it, the database is stored on server and database name is abc, now when i try accessing the server from sql server 2005, it would not access. what should i enter in server txtbox, authentication textbox and the above statement doesn't show any username, so is there any username or password...
please provide help,
Thanx,
haseeb
haseeb
|
|
|
|
|
Hi,
First, note that it uses a named instance (SQLEXPREESS) , so when you try to connect the server you need to specify all (SERVER\SQLEXPRESS)
Second, it is using Integrated Security, so, seems you dont need any specific user/password information.
And yes, the database name is : abc

|
|
|
|
|
Use server explorer of visual studio/database explorer of visual web developer
Right Click Data Connections -> Add Connection
Server Name= IP Address of the remote server [must be static IP]
SQl Authentication:
User Name = type in user name who has authentication
Password = type your password
Click on Test Connection, it will work.
If test not succeed then try to ping the IP Address from command prompt. If not pings, its networking fault. and if it works then check permissions of the server.
|
|
|
|
|
If the database is on the pc you are coding on ,
change >> Data Source=SERVER\SQLEXPRESS to Data Source=(local)\SQLEXPRESS
|
|
|
|
|
Hi all,
One Page of my ASP.NET application uses an active directory search to fetch the list of users.
The Problem is :
This page works fine all day long but sometimes throws an error "The server is not operational".
This error disappears when the IIS is reset, but appears again after 2 or 3 hrs.I am unable to find out the reason behind this.I am sending you the details I found in the event Viewer:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 4/15/2009 6:23:17 AM
Event time (UTC): 4/15/2009 1:23:17 PM
Event ID: dbd99a355e4f451da4fd7e4f50e0f8e1
Event sequence: 21
Event occurrence: 6
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/399023246/Root/Mail-14-128842748654050392
Trust level: Full
Application Virtual Path: /Mail
Application Path: C:\Inetpub\wwwroot\EnhancementSite\Mail on myip\
Machine name: mymachinename
Process information:
Process ID: 2380
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: COMException
Exception message: The server is not operational.
Request information:
Request URL: http://mydomain.com/Mail/newmail.aspx
Request path: /Mail/newmail.aspx
User host address: mydomain.com
User: username
Is authenticated: True
Authentication Type: NTLM
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 5
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_AdsObject()
at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
at System.DirectoryServices.DirectorySearcher.FindAll()
at GetAllUsers.getUsers.getUsername(DropDownList dduserlist)
at Mail.newmail.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
kindly help me find a permanent solution to this problem as iisreset is not a very good option.
Thanks
Vasillis_zayetsav
|
|
|
|
|
Try this...
Replace the values for user and active directory group.
DirectoryEntry ent = new DirectoryEntry(appSettings.domain, appSettings.user, appSettings.password, AuthenticationTypes.ReadonlyServer);
DirectorySearcher srch = new DirectorySearcher(ent, "(CN=" + activeDirectoryGroup + ")");
SearchResult obj = srch.FindOne();
DirectoryEntry dr = new DirectoryEntry(obj.Path, appSettings.user, appSettings.password);
foreach (object ob in (IEnumerable)dr.Invoke("members"))
{
DirectoryEntry obGpEntry = new DirectoryEntry(ob);
//Put your code here.
}
I didn't get any requirements for the signature
|
|
|
|
|
Any thoughts how to prevent displaying querystring value information...e.g. abc.aspx?userid=103?
If someone wants they can type in userid=101 or 102 to display information for the other records by typing in the URL. I've heard folks use GUIDs when passing ID's in URLS. When you see a large value of 889EA536-0B32-3345-B124-F44141C50CB7 would make it complicated to guess the next record. My guess they'd use an INT as the PK, but meanwhile have a GUID column for each user record? Thoughts on that practice?
Thanks
|
|
|
|
|
|
Ya encryption is a good way but its been restricted to 2mb in IE and again it depends on the browser you are using.
|
|
|
|
|
If you don't want people to see your querystring, then save it to database and use some ID, preferably GUID. Then based on the id you read the querystring value.
another technique is to host your application in iframe, that way only the top level url which houses the iframe will be visible and the user can not see the full url + querystring.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|