|
great
***** Programme comme si dept soutien technique. est plein de tueurs en série et ils savent adresse de votre domicile. *****
|
|
|
|
|
Hi,
I need to build a ASP.net web page which can be added to any web application to show the helath of the web application.
The Items that it need to check:
1. Is the DB up and running - The DB connection string should be automatically picked from web.config
2. Any web services referenced by that applications are up and running.
3. Check for any DB jobs for that User in DB and get the last run time.
etc...
Any help in this direction is highly appreciated.
Thanking you advance,
Neha
|
|
|
|
|
|
Thanks Vipul for your response.
Actually I am more interested on the generic stuff.
The application which I am working on
1) Should query all the WebSites configured in the IIS of the system where the proposed application is deployed,
2) Read the individual web.config files of thoses applications and get the Connection Strings, Web Refrences etc.
3) Ping the DB / Web Services and show the responses.
Thanks,
Neha
|
|
|
|
|
Hi All,
if (!IsPostBack)
{
if (Session["userId"] == null || Session["SessionId"] == null)
Response.Redirect("~/Login.aspx");
else
{
BindModalities();
UserRole curRole = (UserRole)Convert.ToInt32(Session["roleId"]);
InitializeRoleView(curRole);
if (Session["SelWorklistView"] != null)
InitializeWorklistView();
else
{
if (curRole == UserRole.Admin)
{
Session["SelWorklistView"] = (Int32)Global.WorklistView.ReqPending;
InitializeWorklistView();
}
else
{
Session["SelWorklistView"] = (Int32)Global.WorklistView.Pending;
InitializeWorklistView();
}
}
}
}
and in Row Data Bound Event
This will add silverlight button in a grid.
protected void worklistGridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
RisStudyItem selStudy = e.Row.DataItem as RisStudyItem;
string idealHost = selStudy.Server.HostLocal;
string tempStr = idealHost.Substring(0, idealHost.LastIndexOf('.') + 1);
if (idealHost == null || idealHost == "" || tempStr == null || tempStr == "" || !Request.UserHostAddress.StartsWith(tempStr))
idealHost = selStudy.Server.HostExt;
HtmlGenericControl obj = new HtmlGenericControl("object");
obj.Attributes["data"] = "data:application/x-silverlight-2,";
obj.Attributes["type"] = "application/x-silverlight-2";
obj.Attributes["height"] = "30px";
obj.Attributes["width"] = "130px";
HtmlGenericControl par1 = new HtmlGenericControl("param");
par1.Attributes["name"] = "source";
par1.Attributes["value"] = "../ClientBin/Moksha.Ris.Silverlight.xap";
obj.Controls.Add(par1);
HtmlGenericControl par2 = new HtmlGenericControl("param");
par2.Attributes["name"] = "onError";
par2.Attributes["value"] = "onSilverlightError";
obj.Controls.Add(par2);
HtmlGenericControl par3 = new HtmlGenericControl("param");
par3.Attributes["name"] = "background";
par3.Attributes["value"] = "white";
obj.Controls.Add(par3);
HtmlGenericControl par4 = new HtmlGenericControl("param");
par4.Attributes["name"] = "minRuntimeVersion";
par4.Attributes["value"] = "3.0.40624.0";
obj.Controls.Add(par4);
HtmlGenericControl par5 = new HtmlGenericControl("param");
par5.Attributes["name"] = "autoUpgrade";
par5.Attributes["value"] = "true";
obj.Controls.Add(par5);
HtmlGenericControl par6 = new HtmlGenericControl("param");
par6.Attributes["name"] = "initParams";
par6.Attributes["value"] = "suid=" + selStudy.StudyInstanceUID +
",studyInsts=" + selStudy.NumberOfStudyRelatedInstances +
",idealHost=" + idealHost +
",studyDate=" + selStudy.StudyDate +
",username=" + selStudy.Server.Username +
",password=" + selStudy.Server.Password;
obj.Controls.Add(par6);
e.Row.Cells[14].Controls.Add(obj);
}
}
I have a Radio button in Grid so when i m selecting silverlight control so i need to all thing again.
Thanks and regards,
Amit Patel
|
|
|
|
|
|
how to give acess to different users for different pages (ie when user login based on his permissions he should be able to access his pages) usin asp.net with c#
|
|
|
|
|
You could use an atrribute to check the status of the user and redirect accordingly.
Here is some simplistic pseudo code:
[AttributeUsage(AttributeTargets.All)]
public sealed class UserStatus : Attribute
{
public UserStatus()
{
if (!UserShouldBeHere)
{
HttpContext.Current.Response.Redirect("SomewhereElse.aspx");
}
}
}
At the top of each page you want to check this on decorate the class with:
[UserStatus]
public partial class MyAccount : Page
... code continues
|
|
|
|
|
|
Thanks, but I know what I meant. You should add this as a separate answer as it is equally as valid and should be able to be marked on it's own. (Not everyone uses principals, roles, etc, to model security).
|
|
|
|
|
Sorry some mistake was there i did not want to post the message to you..
Thanks.
|
|
|
|
|
the code which you have send where we have to write the code.and can you give small example for this...
|
|
|
|
|
Put this below attribute in the top of your Page Code behind and Name Parameter is the permitted user for this page....
[PrincipalPermission(SecurityAction.Demand,Name=@"kovairindia\palash",Unrestricted=false)]
Thanks
|
|
|
|
|
Use..
[PrincipalPermission(SecurityAction.Demand,Name=@"kovairindia\palash",Unrestricted=false)]
public partial class Test : System.Web.UI.Page
Only the user palash of domain Kovairindia will access this page. If Other one say rahul of Kovairindia domain will get System.Security.SecurityException exception.
N.B:You can also give a permission to a Role for your page.
|
|
|
|
|
Hi Guys,
Scenario:
i've finished an ASP.NET app. The users log on via a secure network anywhere in the world. When they've registered, they download a win app on their systems used to encrypt files. They select the files they want to encrypt, but don't knw the output path (for security reasons). When they log on, they should just click a button and all those encrypted files (from the output location) should be uploaded to the server.
Problem:
However, I do not knw how to automatically start the upload as I don't want them to manually pick the files (they don't even knw where the files are, but i do). Pls help. Deadline close.
He who goes for revenge must first dig two graves.
|
|
|
|
|
If you are having them run a Windows app then you have complete control over this. After the files have been encrypted push them to the location of your choice. What part are you stuck with?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark, they've got to be logged online and on the web page to let this happen. Pls how do I let this happen on a click of a button?
He who goes for revenge must first dig two graves.
|
|
|
|
|
A WebService is probably the easiet to start with. Have the Windows app send the files to the WebService. If you wanted to do it from the webpage you'd have to create a form, add the files, and submit it.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Sir,
I have developed one website in asp.net and try to send mail using smtp server in our local server.When i try to send messages using this system ,i got the following error
"MailBox unavailable.the server response was 5.7.1.unable to relay for dennyj@gmail.com"
if anyone knows about the problem,pls give me a help.
Thanks
Denny
|
|
|
|
|
you need to set smtp relay server settings once check whether your sent mail is in Badmail folder in inetpub.
|
|
|
|
|
the problem is exced number mail send
|
|
|
|
|
HI
Can any one kindly let me know how to create an api in .net for all plat forms e.g. web,windows,PDP etc, whats the best practice and if any one can provide me the code snippet i would be very thank ful to him, kindly reply asap,
regards,
|
|
|
|
|
One that's a very broad request, perhaps you could tell us what sort of API are you talking about.
Two, all the platforms are so different that if you could ever build one to cover all it would be so massive as to be unusable.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Firstly, you need to understand what you are talking about, which is painfully obvious that you don't. Research what an API actually is, then you will understand why this is a stupid question.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
How can i have textbox with default language(examplae :PersianOr Farsi)
|
|
|
|