问题:

我试图通过Web部署将我的计算机上的网站发布到IIS Web服务器。

我有3台服务器。 所有服务器都安装了相同的东西(Webdeploy等)并启动了服务(Web部署代理服务和Web管理服务)。

在第一台服务器上,我没有连接问题。 但是当我在Visual Studio中“验证连接”到IIS时,其他两个服务器给我一些错误。 当我查看IIS服务器上的日志时,我的访问监听了html代码200(ok)。

在远程计算机上处​​理请求时出错。 文件名:MACHINE / WEBROOT

错误:无法读取配置节’system.webServer / management / delegation’,因为它缺少架构

我真的不知道什么可以解决这个问题,希望你能帮助我。

I am trying to publish a website from my computer to an IIS web server via web deploy.I have 3 servers.All servers have installed the same things (Webdeploy etc.) and the services are started (Web Deployment Agent Service and Web Management Service).On the first server I have no problems on connecting.But the other two servers give me some error when I “Validate Connection” in Visual Studio to the IIS.When I look at the logs on the IIS server, there are my accesses listet with html code 200 (ok).An error ocurred when the request was processed on the remote computer.Filename: MACHINE/WEBROOTError: The configuration section ‘system.webServer/management/delegation’ cannot be read because it is missing schemaI really have no idea what could solve this problem and hope you are able to help me.

问题:

我有一个目录apkmirror-scraper-compose ,结构如下:

.
├── docker-compose.yml
├── privoxy
│   ├── config
│   └── Dockerfile
├── scraper
│   ├── Dockerfile
│   ├── newnym.py
│   └── requirements.txt
└── tor
    └── Dockerfile

我正在尝试运行以下docker-compose.yml :

version: '3'

services:
  privoxy:
    build: ./privoxy
    ports:
      - "8118:8118"
    links:
      - tor

  tor:
    build:
      context: ./tor
      args:
        password: ""
    ports:
      - "9050:9050"
      - "9051:9051"

  scraper:
    build: ./scraper
    links:
      - tor
      - privoxy

torDockerfile是哪里的

FROM alpine:latest
EXPOSE 9050 9051
ARG password
RUN apk --update add tor
RUN echo "ControlPort 9051" >> /etc/tor/torrc
RUN echo "HashedControlPassword $(tor --quiet --hash-password $password)" >> /etc/tor/torrc
CMD ["tor"]

对于privoxy

FROM alpine:latest
EXPOSE 8118
RUN apk --update add privoxy
COPY config /etc/privoxy/config
CMD ["privoxy", "--no-daemon"]

其中config由两行组成

listen-address 0.0.0.0:8118
forward-socks5 / tor:9050 .

scraperDockerfile

FROM python:2.7-alpine
ADD . /scraper
WORKDIR /scraper
RUN pip install -r requirements.txt
CMD ["python", "newnym.py"]

其中requirements.txt包含单行requests 最后,程序newnym.py旨在简单地测试使用Tor更改IP地址是否正常工作:

from time import sleep, time

import requests as req
import telnetlib


def get_ip():
    IPECHO_ENDPOINT = 'http://ipecho.net/plain'
    HTTP_PROXY = 'http://privoxy:8118'
    return req.get(IPECHO_ENDPOINT, proxies={'http': HTTP_PROXY}).text


def request_ip_change():
    tn = telnetlib.Telnet('tor', 9051)
    tn.read_until("Escape character is '^]'.", 2)
    tn.write('AUTHENTICATE ""\r\n')
    tn.read_until("250 OK", 2)
    tn.write("signal NEWNYM\r\n")
    tn.read_until("250 OK", 2)
    tn.write("quit\r\n")
    tn.close()


if __name__ == '__main__':
    dts = []
    try:
        while True:
            ip = get_ip()
            t0 = time()
            request_ip_change()
            while True:
                new_ip = get_ip()
                if new_ip == ip:
                    sleep(1)
                else:
                    break
            dt = time() - t0
            dts.append(dt)
            print("{} -> {} in ~{}s".format(ip, new_ip, int(dt)))
    except KeyboardInterrupt:
        print("Stopping...")
        print("Average: {}".format(sum(dts) / len(dts)))

docker-compose build构建成功,但是如果我尝试使用docker-compose up ,我会收到以下错误消息:

Creating network "apkmirrorscrapercompose_default" with the default driver
ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network

我尝试在此错误消息上搜索帮助,但找不到任何帮助。 导致此错误的原因是什么?

I have a directory apkmirror-scraper-compose with the following structure:I’m trying to run the following docker-compose.yml :where the Dockerfile for tor isthat for privoxy iswhere config consists of the two linesand the Dockerfile for scraper iswhere requirements.txt contains the single line requests .Finally, the program newnym.py is designed to simply test whether changing the IP address using Tor is working:The docker-compose build builds successfully, but if I try docker-compose up , I get the following error message:I tried searching for help on this error message, but couldn’t find any.What is causing this error?

问题:

我是Angular的新手。 我开始了“英雄之旅”以学习它。 因此,我创建了带有two-way绑定的app.component

import { Component } from '@angular/core';
export class Hero {
    id: number;
    name: string;
}
@Component({
    selector: 'app-root',
    template: `
        <h1>{{title}}</h1>
        <h2>{{hero.name}}  details!</h2>
        <div><label>id: </label>{{hero.id}}</div>
        <div><label>Name: </label>
            <input [(ngModel)]="hero.name" placeholder="Name">
        </div>
    `,
    styleUrls: ['./app.component.css']
})
export class AppComponent {
    title = 'Tour of Heroes';
    hero: Hero = {
        id: 1,
        name: 'Windstorm'
    };
}

在学习本教程之后,我导入了FormsModule并将其添加到声明数组中。 错误出现在此步骤:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { FormsModule } from '@angular/forms';

@NgModule({
  declarations: [
      AppComponent,
      FormsModule
  ],
  imports: [
    BrowserModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

这是错误:

未捕获的错误:模块’AppModule’声明了意外的模块’FormsModule’。 请添加@ Pipe / @ Directive / @ Component批注。

I’m new in Angular.I started Tour of Heroes to learn it.So, I am created an app.component with two-way binding.Following the tutorial I imported FormsModule and added it into declarations array.Error appeared at this step:Here is error:Uncaught Error: Unexpected module ‘FormsModule’ declared by the module ‘AppModule’.Please add a @Pipe/@Directive/@Component annotation.

问题:

切入追逐我已经重新创建了我的问题,因为它是相当自我解释的。

这符合,没有错误:

switch (n) {
    case 1:
        NSLog(@"");
        NSString *aStr;
        break;
    default:
        break;
    }

这编译错误 ,它只缺少NSLog():

switch (n) {
    case 1:
        NSString *aStr;
        break;
    default:
        break;
    }

它在编译时出现错误“NSString’之前的预期表达式

我在这里错过了什么吗?

Cut to the chase I have recreated my problem as it is fairly self explanatory.this complies without error:this compiles with error and it’s only missing the NSLog():it throws an error at compile ” Expected expression before ‘NSString’ “Am I missing something here?

问题:

所以我试图将一个主键添加到我的数据库中的一个表。 现在它有一个这样的主键:

PRIMARY KEY (user_id, round_number)

其中user_id是外键。

我想把它改成这个:

PRIMARY KEY (user_id, round_number, created_at)

我在phpmyadmin中通过单击表结构视图中的主键图标来执行此操作。

这是我得到的错误:

#1025 - Error on rename of './database/#sql-2e0f_1254ba7' to './database/table' (errno: 150)

它是一个带有InnoDB表引擎的MySQL数据库。

So I am trying to add a primary key to one of the tables in my database.Right now it has a primary key like this:Where user_id is a foreign key.I am trying to change it to this:I am doing this in phpmyadmin by clicking on the primary key icon in the table structure view.This is the error I get:It is a MySQL database with InnoDB table engine.