what is http://localhost:60496 ?
when we run on IIS why it comes http://localhost why not http://localhost:60496?
what is that number?
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 15, 2013, 8:03 PM EDT
When you run your application locally (i.e. by press F5 or view in browser) that time it will assign portnumber automatically. since it uses Visual Studio Development server instead of your local IIS. This port number you can set for each application by setting the value assign port under Web->Servers.
Regards,
Iftikar
Deependra Khangarot199 reputationPosted Aug 15, 2013, 8:05 PM EDT
The number in url is port number.
You can change this number following below steps:
You can configure IIS too to use port number.
Manj N144 reputationPosted Aug 15, 2013, 8:11 PM EDT
i want to know why that port number assign automatically when i run locally?
y it is not in IIS?
Manj N144 reputationPosted Aug 15, 2013, 8:17 PM EDT
my program in f:/abc/ab/programname
when i run the program, localhost/programname comes?
why it not takes localhost/f/abc/ab/programename ?
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 15, 2013, 8:18 PM EDT
Regards,
Iftikar
Manj N144 reputationPosted Aug 15, 2013, 8:36 PM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 15, 2013, 8:43 PM EDT
Regards,
Iftikar
Manj N144 reputationPosted Aug 15, 2013, 10:03 PM EDT
when i run program locally it gives correct answer.. when i run on IIS it gives error...
error when download the excel page.... the error is
The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
the code is
protected void Expgo_Click(object sender, EventArgs e)
{
/*************************************
* On export click, select date range
* Generate weekley TimeSheet Report
************************************/
QueryRet Value = new QueryRet();
String StartCalDate;
String EndCalDate;
StartCalDate = ExpCalStart.SelectedDate.ToString();
EndCalDate = ExpCalEnd.SelectedDate.ToString();
if (StartCalDate == EndCalDate)
{
Weekview.SetActiveView(Blank);
lblerr.Text = "Please Select Range of Dates.";
lblerr.Visible = true;
}
else
{
ExcelApp = new Excel.Application();
ExcelApp.Visible = false;
ExcelWork = (Excel._Workbook)(ExcelApp.Workbooks.Add(Missing.Value));
string strCurrentDir = Server.MapPath("~/TimeSheets/");
RemoveFiles(strCurrentDir);//removes all .xls files in directory
DateTime Daylist;
String Query;
/********************************************************
* Select all WeekStartDates in the given range of dates
********************************************************/
Query = "SELECT DISTINCT WeekStartDate FROM TimeSheetBreakDown";
Query += " Where Date >= '" + Convert.ToDateTime(StartCalDate).ToString("yyyy/MM/dd") + "' AND Date<='" + Convert.ToDateTime(EndCalDate).ToString("yyyy/MM/dd") + "'";
ArrayList DistinctStart = Value.ExecuteQry(Query);
if (ExcelWork.Worksheets.Count <= DistinctStart.Count)
{
ExcelWork.Worksheets.Add(Missing.Value, Missing.Value, DistinctStart.Count - ExcelWork.Worksheets.Count + 1, Missing.Value);
}
for (int s = 0; s < DistinctStart.Count; s++)
{
/******************************************************
* For each of the week which come under date selected
* Generate One Excel Work Sheet
******************************************************/
try
{
Query = "SELECT distinct Date FROM TimeSheetBreakDown WHERE (WeekStartDate = '" + DistinctStart[s] + "' AND Day='1') order by date";
Daylist = DateTime.Parse(Value.SelectQry(Query));
/******************************************************************
* From the Distinct StartDate Get (Date of) Monday of that week
* From Monday Calculate other Days From TimeSpan
* ****************************************************************/
mon = Daylist;
tue = Daylist + new TimeSpan(1, 0, 0, 0);
wed = Daylist + new TimeSpan(2, 0, 0, 0);
thu = Daylist + new TimeSpan(3, 0, 0, 0);
fri = Daylist + new TimeSpan(4, 0, 0, 0);
sat = Daylist + new TimeSpan(5, 0, 0, 0);
sun = Daylist + new TimeSpan(6, 0, 0, 0);
}
catch (Exception X)
{
lblerr.Text = X.Message + " Looks like you are Exporting Blank TimeSheet";
lblerr.Visible = true;
}
finally
{
GC.Collect();
/**************************************************************
* Generates one Excel WorkSheet (Gives TimeSheet of that Week)
**************************************************************/
GenerateExcel(s + 1);
}
}
DistinctStartCount = DistinctStart.Count + 1;
SummarySheet();
ExcelApp.Visible = false;
ExcelApp.UserControl = false;
String FileName = "" + User.Identity.Name + ".xlsx";
ExcelWork.SaveCopyAs(strCurrentDir + FileName);
String TimeSheetPath = (String)System.Configuration.ConfigurationManager.AppSettings["TimeSheetPath"].ToString();
string strMachineName = Request.ServerVariables["SERVER_NAME"];
Expgo.Text = "Download TimeSheet";
//TODO: CLean Up...
ExcelApp.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject(ExcelRange);
System.Runtime.InteropServices.Marshal.ReleaseComObject(ExcelApp);
System.Runtime.InteropServices.Marshal.ReleaseComObject(ExcelSheet);
System.Runtime.InteropServices.Marshal.ReleaseComObject(ExcelWork);
ExcelSheet = null;
ExcelWork = null;
ExcelApp = null;
GC.Collect();
}
}