我在Http Server代码中的问题 [英] my problem in Http Server code

查看:80
本文介绍了我在Http Server代码中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我写了一个HTTP服务器,

当我用visual studio运行HTTP服务器(开始调试)时,它运行正常。我的回答写的正确。

在我的页面中,我写了一些正确编写的.css和.js文件。并且我的页面加载好了,



但是

当我通过双击exe文件运行时:.css和.js文件写错了,因为第一个文件写的是日期和时间字符串!




I wrote an HTTP server ,
When I run the HTTP server with visual studio(start debugging), it works ok. my responses are written correctly.
in my page, i write some .css and .js files that they are written correctly. and my page is loaded ok,

but
when i run by double click on "exe" file : the .css and .js files are written with errors, because The first file is written Date and Time string!

<pre>Server: Microsoft-HTTPAPI/2.0
Date: Mon, 26 Aug 2013 05:17:58 GMT

... // text of .css or .js </pre>

这个问题的原因是什么?

What is the reason for this problem ?

推荐答案

从visual studio运行程序的主要区别在调试模式下,双击exe文件是您的工作目录是另一个。在第一种情况下,它是项目目录或您在调试选项卡下的项目设置中指定的任何内容。在第二种情况下,它是exe文件所在的目录。要检查是否是您的复杂原因,请将exe文件移动到项目目录并从那里运行。
The main difference between running a program from visual studio in debugging mode and double-clicking the exe file is that your working directory will be a different one. In the first case it is the project directory or whatever your have specified in the project settings under the debugging tab. In the second case it is the directory in which your exe file resides. To check whether that is the reason for your complications move the exe file to your project directory and run it from there.


调试选项卡下项目设置中的项目目录为:
project directory in project settings under the debugging tab is :


(TargetPath)
(TargetPath)

我将exe文件移动到项目目录并运行它,但需要调试文件夹中的文件!我的问题的原因不是2,所以呢?

i moved the exe file to the project directory and run it, but it need to files that is in debug folder! reason for my problem is not in 2 case, so what?


这篇关于我在Http Server代码中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆