|
Ok, go:
<br />
DateTime R_start = DateTime.UtcNow;<br />
<br />
<br />
DateTime R_end = DateTime.UtcNow;<br />
long timeCounter = (long)(R_end - R_start).TotalMilliseconds;<br />
Response.Write (timeCounter);<br />
|
|
|
|
|
I'm really stumped on this security issue. I get a windows challenge, pop-up, login dialog, whatever you want to call it, when I go to my website. Here is what I have so far:
1) I can get to services.xxx.com just fine ( no pop-up)
2) When I go to services.xxx.com/newsite I get the login pop up
3) services.xxx.com/newsite is a .NET 2.0 site with windows authentication in the web.config <authentication mode="Windows">
4) services.xxx.com/newsite is running as an application in IIS 6.0 (not as a virtual directory it physically sits under the root in the windows directory)
5) If I click "Cancel" on the pop up I get a "HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.
Internet Information Services (IIS)"
6) If I enter the same login I use to remote desktop to that server, I gain access to the site
7) In windows security, the folder "newsite" inherits all it's permission from the parent directory.
8) If I open in IE on the web server itself like this http://localhost/newsite it opens w/o a login, but if I use the domain http://services.xxx.com/newsite then I get the pop-up
I want to allow anyone on the web to see this site (eventually but not yet so I didn't post the actual url ) . Can anyone help?
-- modified at 17:52 Wednesday 27th December, 2006
|
|
|
|
|
Well it sounds like your system only trusts the local intranet. Review your firewall settings and your IIS configuration to make sure they all to all (in fact sometimes you should block local to stop worms).
My best advice at this time (without being able to review your settings) is tha you should switch to Apache.
Brad
Australian
-CAUTION-
The previous statement may contain traces of PHP, and by reading this statement you negate the right to vote me down.
|
|
|
|
|
I have been developing a web application. In that Home Page is having almost 200 KB of images. I tried to optimise the image sizes. After reducing all images it become around 200 KB( Since it is clients requirents I can remove some images ). Now my Home Page is taking almost 17-200 seconds for downloading.
Can anybody help me in improving the page load time, ... means what can I do so that loading images can be faster.
Thanks in advance.
Arindam
|
|
|
|
|
Holy #$@!
What were you doing while you were at web design school??;P
Make all images in low quality "gifs" and try your best to replace them with text in divs where you can.
Brad
Australian
-CAUTION-
The previous statement may contain traces of PHP, and by reading this statement you negate the right to vote me down.
|
|
|
|
|
Hi Brad
Appreciate your suggestion.
Any other idea if you can share to me ...
Arindam
|
|
|
|
|
|
Well,
If te client wants these images he will have to accept that his homepage will take that long to download.
But, do make sure that the images are at their maximum compression!
200K images are very big for a home page.
Check out Microsofts home page. there 3 images, 1 big one and 2 smaller ones. all together are around 65K..
If you want to achive performance, your design is wrong form the very beginning.
|
|
|
|
|
Can I delete all the elements at once from a .net server drop down list control by using Javascript function.
Or atleast show me how can I find the count of items in a .net server side drop down list box by using Javascript function.
So that I can use .remove().
But show me atleast any one thing, please.
Thank you very much.
-- modified at 8:07 Wednesday 27th December, 2006
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Mate, as nice it is to have inquisitive people, this board is not for ASP. Try the ASP board.
Brad
Australian
-CAUTION-
The previous statement may contain traces of PHP, and by reading this statement you negate the right to vote me down.
|
|
|
|
|
Post back is the only problem for me I dont want to use it. I want to display a Date field with three combo boxes. When month and year are selected, automatically the days combo must me filled with those many number of days according to leap or not and then 31 or 30 like that. So please help me if any body could do it.
Thank you.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Try this Javascript function on each combo's on change event....
function GetDayOfMonth(DayCtrlName, MonthCtrlName, YearCtrlName){
var DayCtrl=document.getElementById(DayCtrlName);
var MonthCtrl=document.getElementById(MonthCtrlName);
var YearCtrl=document.getElementById(YearCtrlName);
var lastDayValue=DayCtrl.value;
var DaysCount=31;
if (MonthCtrl.options[MonthCtrl.selectedIndex].value=='2' &&
(parseInt(YearCtrl.options[YearCtrl.selectedIndex].value)%4)==0){
DaysCount=29;
}else if (MonthCtrl.options[MonthCtrl.selectedIndex].value=='2'){
DaysCount=28;
}else if (MonthCtrl.options[MonthCtrl.selectedIndex].value=='4' ||
MonthCtrl.options[MonthCtrl.selectedIndex].value=='6' ||
MonthCtrl.options[MonthCtrl.selectedIndex].value=='9' ||
MonthCtrl.options[MonthCtrl.selectedIndex].value=='11'){
DaysCount=30;
}
DayCtrl.options.length=0;
var oOption;
for (var i=1;i<=DaysCount;i++){
oOption = document.createElement('option');
DayCtrl.options.add(oOption);
oOption.innerHTML=i;
oOption.value=i;
if (i==lastDayValue) oOption.selected=true;
}
}
Regards,
Venkatesh Mookkan.
|
|
|
|
|
I tried to connect in this way the javascript function to "OnSelectedIndexChanged" event hanlder. But Its not giving me any thing. Means its not adding this "Javascript" function to the event. What may be the problem. If you can please help me by giving some code snippet too please.
ddlMonRes.Attributes.Add("OnSelectedIndexChanged", "GetDayOfMonth1();")
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hi,
i am using class System.EnterpriseServices for transaction management and i m using a strong name file keypair for strong name and keypair1.snk for strong name token and i give the key pair file name in solution explorer\Property pages\Msbuild option but when i compiled web project in debug mode its giving me error. i have paste the compelete error message.
I m confused why visual studio create random files for this and why its not running from my virtual folder if some body know about this error reply me soon
Best Regards
Tariq Mahmood
System.EnterpriseServices.RegistrationException was unhandled by user code
Message="The assembly 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\trinity\951852e9\59d35ae4\App_Code.xsmhqh4d.dll' does not have a strong name."
Source="System.EnterpriseServices"
StackTrace:
at System.EnterpriseServices.RegistrationDriver.InstallAssembly(RegistrationConfig regConfig, Object obSync)
at System.EnterpriseServices.RegistrationHelper.InstallAssemblyFromConfig(RegistrationConfig& regConfig)
at System.EnterpriseServices.RegistrationHelper.InstallAssembly(String assembly, String& application, String partition, String& tlb, InstallationFlags installFlags)
at System.EnterpriseServices.RegistrationHelper.InstallAssembly(String assembly, String& application, String& tlb, InstallationFlags installFlags)
at System.EnterpriseServices.RegistrationHelper.System.EnterpriseServices.Thunk.IThunkInstallation.DefaultInstall(String asm)
at System.EnterpriseServices.Thunk.Proxy.RegisterAssembly(Assembly assembly)
at System.EnterpriseServices.Thunk.Proxy.LazyRegister(Guid id, Type serverType, Boolean checkCache)
at System.EnterpriseServices.Thunk.Proxy.CoCreateObject(Type serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri)
at System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type serverType)
at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type serverType, Object[] props, Boolean bNewObj)
at newuser.btnSubmit_Click(Object sender, EventArgs e) in E:\Tariq\Project1\Trinity\newuser.aspx.vb:line 29
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Tariq Mahmood
Software Engineer
|
|
|
|
|
How can I add elements in to a .Net Drop down list server control using Javascript function. Like I have 3 dropdown list server controls. I want change the date field whenever month or year changed. If possible please give some code snippet.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
You probably want to do this with a postback, or use AJAX/Atlas
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Post back is the only problem for me I dont want to use it. I want to display a Date field with three combo boxes. When month and year are selected, automatically the days combo must me filled with those many number of days according to leap or not and then 31 or 30 like that. So please help me if any body could do it.
Thank you.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
How can I add elements in to a Drop down list server control using Javascript function. Like I have 3 dropdown list server controls. I want change the date field whenever month or year changed. If possible please give some code snippet.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
The problem is, when you add items using javascript, they won't be in the viewstate, and so won't appear in your server side code, at least, not as a result of a postback.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I tried to connect in this way the javascript function to "OnSelectedIndexChanged" event hanlder. But Its not giving me any
thing. Means its not adding this "Javascript" function to the event. What may be the problem. If you can please help me by
giving some code snippet too please.
ddlMonRes.Attributes.Add("OnSelectedIndexChanged", "GetDayOfMonth1();")
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
I have created a crystal report web project. When my report was static the print/Export buttons were working fine. I exported report to pedf. But I changed the report as dynamic. Now the export and print buttons on the Crystal Report toolbar are not working. How can I print or export from the toolbar buttons? Please help me.
Arghya Mahapatra
|
|
|
|
|
1. I want to access a Server control in .net within a Javascript function. I used this method.
alert(alter(document.getElementById('tbCmpName').id); still its not working.
Can any body help me in accessing server side control from client side scripting?
2. How can I declare string variables in Javascript?
3. And one more question, how can I get the length of a string?
Please reply me for these queries.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
indian143 wrote: I want to access a Server control in .net within a Javascript function
Your aspx needs to get the ID from the server code. Like this:
document.getElementById('<%=tbCmpName.ClientID%>')
indian143 wrote: How can I declare string variables in Javascript?
var str = "this is a string";
indian143 wrote: And one more question, how can I get the length of a string?
str.length, I believe.
Google will find you tons of javascript tutorials.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Can anyone point out the error of my ways?
I was under the impression that IE7 implemented the native XMLHTTPRequest object but this code is not working in IE7.
The code works in IE6 (using the ActiveX object) and other browsers that implement the native XMLHTTPRequest object, but not in IE7.
<br />
var XMLHTTPREQUEST_MS_PROGIDS = new Array(<br />
"Msxml2.XMLHTTP.7.0",<br />
"Msxml2.XMLHTTP.6.0",<br />
"Msxml2.XMLHTTP.5.0",<br />
"Msxml2.XMLHTTP.4.0",<br />
"MSXML2.XMLHTTP.3.0",<br />
"MSXML2.XMLHTTP",<br />
"Microsoft.XMLHTTP"<br />
);<br />
<br />
var HTTPREQUEST_UNINITIALIZED = 0;<br />
var HTTPREQUEST_LOADING = 1;<br />
var HTTPREQUEST_LOADED = 2;<br />
var HTTPREQUEST_INTERACTIVE = 3;<br />
var HTTPREQUEST_COMPLETED = 4;<br />
var HTTPREQUEST_SUCCESS = 200;<br />
<br />
function getXMLHttpRequest(){<br />
var httpRequest = null;<br />
<br />
if (window.XMLHttpRequest)<br />
httpRequest = new window.XMLHttpRequest();<br />
else if (window.ActiveXObject){<br />
var success = false;<br />
for(var i = 0; i < XMLHTTPREQUEST_MS_PROGIDS.length; i++){<br />
try{<br />
httpRequest = new ActiveXObject(XMLHTTPREQUEST_MS_PROGIDS[i]);<br />
success = true;<br />
}
catch(e){}<br />
}
}
<br />
if (httpRequest == null)<br />
alert("Error in HttpRequest():\n\n"<br />
+ "Cannot create an XMLHttpRequest object.");<br />
<br />
return httpRequest;<br />
}
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
if someone can help please
i want the java script which enable me to make preloader if someone can help please urgent
thanks in advance
|
|
|
|