发表表格但参数丢失

时间:2017-08-31 01:53:40

标签: post dll asp-classic com 64-bit

我现在正在从x86到x64进行操作系统更新。

这是一个.asp项目,在x86上工作正常,但在x64上不行。

问题是x64在发布后无法获取表单参数。

tgtdir = mySmartUpload.Form("tgtdir").Values
  

tgtdir是空的!!!

IIS设置有问题吗?或其他什么?

如果您有任何想法,请随时留下答案或评论。

我写的一些代码是......

  

在Main.asp中

<HTML>
<HEAD>
  <TITLE></TITLE>
</HEAD>
<BODY topmargin=4  leftmargin=10 bgcolor=wheat>
  <FORM id=form01 name=form01 align=center enctype="multipart/form-data">
    <TABLE width=100% align=center>
      <TR>
      <TH>
        <FIELDSET>
          <TABLE>
            <TR>
              <TD colspan=2>
                <INPUT type=file id=file01 name=file01 style="WIDTH: 400 px" value="Preview">
            <TR>
          </TABLE>
        </FIELDSET>
      </TH></TR>
    </TABLE>    
    <INPUT type=hidden id=tgtdir name=tgtdir value="AAA">
  </FORM>
  <DIV>
    <IFRAME id=frameUpload name=frameUpload >
    </IFRAME>
  </DIV>
</BODY>
</HTML>
  

在fileupload.asp

<HTML>
<HEAD>
  <TITLE></TITLE>
</HEAD>
<BODY>
<% 
On Error Resume Next
    Dim mySmartUpload
    Dim intCount

    Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")

    mySmartUpload.CodePage = "utf-8"
    mySmartUpload.Upload

    Set fso = Server.CreateObject("Scripting.FileSystemObject")
    tgtdir = mySmartUpload.Form("tgtdir").Values

    intCount = mySmartUpload.Save(tgtdir & "\") 
%>
</BODY>
</HTML>

1 个答案:

答案 0 :(得分:0)

现在您已经提供了一些最初缺失的关键信息,我可能会提供帮助。

虽然Request.Form Request.BinaryRead(){% for patient in all_patients %} <!-- Delete Patient --> <input type="hidden" name="patient_id" value="{{ patient.id }}" /> <button type="submit" class="btn btn-default btn-sm" data-toggle="modal" data-target="#{{patient.id}}"> <span class="glyphicon glyphicon-trash"></span> </button> <!-- Modal --> <div class="modal fade" id="{{patient.id}}" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title">Confirm delete</h4> </div> <div class="modal-body"> <p>Are you sure you want to delete {{ patient }}?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">No</button> <form action="{% url 'patients:patient-delete' patient.id %}" method="post" style="display: inline;"> {% csrf_token %} <button type="button" class="btn btn-danger" data-dismiss="modal">Yes</button> </form> </div> </div> </div> </div> 的关联是正确的,但我并不认为这是的问题(来自{{的混淆) 3}})

事实上,我相信I said in the comments original revision of the question

  

那么什么是aspSmartUpload? @Vanquished Wombat说&#34;一个32位的库,可以通过ASP Classic和IIS来上传文件。&#34;

更接近。

所以我做了一点挖掘(因为我自己不使用aspSmartUpload),结果是(根据said This page }) 2008年1月之前的某个时间:

  

aspSmart系列产品已停产。

虽然这本身没有任何问题,但它确实让我觉得他们可能没有发布64位版本的组件,所以问题是试图运行一个32位的COM DLL在64位环境中。

我已多次谈到这一点,但要完全了解您需要将其付诸实施,请参阅last reported scan of the site

有什么奇怪的,你是不是发布了一个错误。如果DLL没有在32位子系统中正确注册,或者IIS站点没有在32位模式下运行它的应用程序池,我预计会出现某种错误

我的建议是完成该答案中的步骤并检查您的设置,底部甚至还有一个 COM DLL清单供您检查。

相关问题