|
If you feel the need to do that, then maybe you don't understand IDs.
|
|
|
|
|
Good Day All
i have an asp.net 4.5 application. i have hosted it on IIS 7.5 in Windows Server 2008. My application has different folders within it and some are for JS and some are for CSS and etc.. and they are inside a directory named "Shared" in my problem and most of the things especially the css , images etc they are reference like this
<link href="../Shared/assets/css/bootstrap.css" rel="stylesheet"/>
<link rel="apple-touch-icon" sizes="57x57" href="../Shared/assets/ico/apple-touch-icon-57x57.png">
now when i host this Project i have issues with CSS and images because they are not retrieved. i use Fiddler to check what is happening and i realised that after i hosted the application now Fiddler reports a 404 error on the following path
http://myiisreserver/Shared/assets/css/bootstrap.css
there are many of them , this is just an Example. now you can see it it can see the server , but instead of adding my Application or website name , it add the Directory within my application. So basically it should look like this
http://myiisreserver/MyWebapplication/Shared/assets/css/bootstrap.css
What could be the Problem.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
The problem is you are using relative urls by using the ../ notation and now that you have deployed it your root appears to be different. You may just have IIS setup wrong as far as what an application is or you may need to change your links.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
The double dots means go back 1 folder level
So if your root is /
and your calling webpage is /about/default.aspx then the double dots apply ../images/header.jpg
If your root is /
and your calling webpage is /default.aspx, the the double dots don't apply /images/header.jpg
Best thing is to take out the dots, and test, to make sure it has nothing to do with the dots first, like the previous post says, confirm your web server is setup right. Then think about the dots when your web app works.
In my beginning, I didn't use the dots, but started using the dots after running test on them and seeing how they actually work.
[EDIT]
Here is some information on the history or use of the double dots so that you can better understand the meaning in various operating systems and URL's
http://en.wikipedia.org/wiki/Path_%28computing%29[^]
This Link is pretty good here
http://teaching.idallen.com/cst8207/12f/notes/160_pathnames.html[^]
I think this one fits the bill here
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005700000009000000.htm[^]
modified 21-Aug-14 15:47pm.
|
|
|
|
|
Thanks for your reply . the funny thing is that i hosted this same deployment in the Paid Domain and it works, So now what i did i created another website in IIS at the Level of "Default" website and i change the Default website port to 8083 so it does not conflict with my other website and i changed the new website to use port 80 and run the site with the ../share path and it worked. it buffles me.
When i used Fiddler , i see it was expecting my website to be in wwwroot folder but when i setup the web application in IIS the virtual Directory was in another drive. so i moved also the files to wwwroot.
Thanks again
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
When I encode a website or web application, I always assume that the root of the project is /
So everything is based off of /
Not sure if I can offer any help or insight on this, I went through that a decade ago, and have always used a systematic way of setting up servers and projects since then.
When I setup a website in IIS, I don't use the default IIS folder, I set everything up on a drive letter like Z
Z:\internet
We use an independent disk drive for websites, which is solid state.
In IIS, We set the Physical Path to let's say
Z:\internet\artisan-plaster.com
Z:\internet\website.com
Right Click website-> Manage Website -> Advanced Settings -> Physical Path
And then run our power shell or just cmd security scripts to that individual physical locations above to set IIS Anonymous and App Pool security for the folders in the project, and RW/RO folder attributes.
|
|
|
|
|
Its ok , everyone needs help at some point. for now my issue is resolved
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
Could you help me.. I need function to compare 2 string and print (show) the difference between 2
|
|
|
|
|
Have a look at DiffPlex[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
|
Unhandled exception at line 79, column 1 in http://localhost:49456/about_us.aspx?_TSM_HiddenField_=ToolkitScriptManager_HiddenField&_TSM_CombinedScripts_=;;AjaxControlToolkit,+Version=1.0.20229.20821,+Culture=neutral,+PublicKeyToken=28f01b0e84b6d53e:en-US:c5c982cc-4942-4683-9b48-c2c58277700f:e2e86ef9:9ea3f0e2:9e8e87e9:1df13a87:4c9865be:ba594826:757f92c2
0x800a139e - JavaScript runtime error: Sys.ArgumentNullException: Value cannot be null.
above error occured for the following code
<td style="text-align:left" class="content">
<asp:TextBox ID="txtName" Width="225px" AutoPostBack ="true" runat="server"
ValidationGroup="valEnquiry" CausesValidation="True" TabIndex="1"></asp:TextBox>
<br />
<asp:RequiredFieldValidator ID="RFName" runat="server" ValidationGroup="valEnquiry" ControlToValidate="txtName" ErrorMessage="Please Enter Your Name" ForeColor="Red"></asp:RequiredFieldValidator>
<cc1:ValidatorCalloutExtender
ID="val_reqDTT"
runat="server"
TargetControlID="RFName">
</cc1:ValidatorCalloutExtender>
</td>
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
The message is telling you where the error occurs, and what type of error it was. However we cannot guess what your Javascript code is trying to do.
|
|
|
|
|
hi Richard thanks for your reply.
But there is no javascript code in the pages.
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
Then it must be in the Ajax code. You need to use your debugger to find out what value is missing, presumably the name field.
|
|
|
|
|
Thanks Richard. Thanks for your effort.
Need to add the following tag in web.config file for .Net Framework 4.5
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None">
</appSettings>
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
guys;
i have 2 request the first is post used to add cookies to response the other is a get request caused by Request.Redirect() call in the first one's server side.
my expectation is to find the added cookies in the second's request cookies, but what really happens is that the added cookies disappear.
please help me with this as i am stuck.
|
|
|
|
|
You should post the relevant code.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Sir;
Thank you for trying to help.
The reason for cookies disappearing was, that I was mistakenly assigning a domain for the response cookies in the post request other than the actual domain, so they wont appear in the redirect request.
Help people,so poeple can help you.
|
|
|
|
|
I need to compare 2 tables to find (List) the difference. How would I do this?
modified 18-Aug-14 13:46pm.
|
|
|
|
|
Sql tables? DataTables? Difference in columns? Difference in data? Need a lot more information.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
try
class Program
{
static void CompareList<T>(List<T> a, List<T> b, ref List<T> diff)
{
foreach(T item in a)
{
if(!b.Contains(item))
{
if(diff.Count == 0)
{
diff.Add(item);
}
else if(!diff.Contains(item))
{
diff.Add(item);
}
}
}
}
static void ListDifference<T>(List<T> a, List<T> b, ref List<T> diff)
{
CompareList(a,b,ref diff);
CompareList(b,a,ref diff);
diff.Sort();
}
static void Main(string[] args)
{
List<int> a = new List<int>{1,2,3,4,5,6,7};
List<int> b = new List<int>{4,6,7,8,9,10};
List<int> diff = new List<int>();
List<string> c = new List<string>{"a", "b", "c", "d","e", "f", "t", "U"};
List<string> d = new List<string>{"b","e","f","g","h"};
List<string> diff2 = new List<string>();
ListDifference(a,b, ref diff);
ListDifference(c, d, ref diff2);
Console.WriteLine("-- Result of CompareLists for Int");
foreach(int i in diff)
{
Console.WriteLine(i.ToString());
}
Console.WriteLine();
Console.WriteLine("Results for CompareLists for strings");
foreach(string s in diff2)
{
Console.WriteLine(s);
}
Console.Read();
}
}
I don't speak Idiot - please talk slowly and clearly
"I have sexdaily. I mean dyslexia. Fcuk!"
Driven to the arms of Heineken by the wife
|
|
|
|
|
Hi,
I want to download multiple pdf files in a single button click. I am using an open source dll, Ionic.Zip.Reduced.dll.
All code runs with out showing any errors or exceptions. By using Response.End(), I am getting a response in firefox's firebug window but when I use it in my application it throws an exception and not showing any download dialogue box. So, I had changed it to HttpContext.Current.ApplicationInstance.CompleteRequest();. Now the exception is gone, but I am not getting any response and dialogue window to download. When I debugged, I found something like this
:ClientDisconnectedToken = 'context.Response.ClientDisconnectedToken' threw an exception of type 'System.PlatformNotSupportedException'
:base {System.NotSupportedException} = {"This operation requires IIS version 7.5 or higher running in integrated pipeline mode."}
What is the real problem here, I could download files in zip by using the same code for a new project.
Please help me to sort this out. Here is my code:
System.Web.HttpContext context = System.Web.HttpContext.Current;
using (ZipFile zip = new ZipFile())
{
zip.AlternateEncodingUsage = ZipOption.AsNecessary;
zip.AddDirectoryByName("PDFs");
foreach (string item in FilePaths)
{
zip.AddFile(item.ToString(), "/PDFs/");
}
context.Response.Clear();
context.Response.BufferOutput = false;
//context.Response.Buffer = true;
context.Response.ClearHeaders();
context.Response.ClearContent();
string zipName = String.Format("Zip_{0}.zip", DateTime.Now.ToString("yyyy-MMM-dd-HHmmss"));
context.Response.ContentType = "Application/zip";
context.Response.AppendHeader("content-disposition", "attachment; filename=" + zipName);
zip.Save(Response.OutputStream);
//Response.Redirect("www.google.com", true);
context.Response.Flush();
context.Response.SuppressContent = true;
context.ApplicationInstance.CompleteRequest();
//Response.End();
}
Thanks in advance
Sarath Raj
|
|
|
|
|
Isn't this a programming related question?
Favourite line: Throw me to them wolves and close the gate up. I am afraid of what will happen to them wolves - Eminem
~! Firewall !~
|
|
|
|
|